Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
All was fine on my couch. And then suddenly, after adding a new template, ALL my templates in the admin panel, when clicked to edit, show:

ERROR: Tag "input" 'name' contains invalid characters. (Only lowercase[a-z], numerals[0-9] hyphen and underscore permitted

I located the source of this in the Couch code and did a print_r on $params and $node - result below fwiw...

Array ( [0] => Array ( [lhs] => name [op] => = [rhs] => PageTitle ) [1] => Array ( [lhs] => type [op] => = [rhs] => bound ) [2] => Array ( [lhs] => trust_mode [op] => = [rhs] => 1 ) ) KNode Object ( [type] => 1 [name] => input [attributes] => Array ( [0] => Array ( [name] => name [op] => = [value] => k_field_input_name [value_type] => 2 ) [1] => Array ( [name] => type [op] => = [value] => bound [value_type] => 1 [quote_type] => ' ) [2] => Array ( [name] => trust_mode [op] => = [value] => 1 [value_type] => 1 [quote_type] => ' ) ) [text] => [ID] => _0_64 [line_num] => 0 [char_num] => 64 [children] => Array ( ) ) ERROR: Tag "input" 'name' contains invalid characters. (Only lowercase[a-z], numerals[0-9] hyphen and underscore permitted

I've changed all 'name=' param values in all templates to lowercase and then pulled them up in a browser - repeatedly.

I've _forced_ admin and editor page reloads by adding parameters on the URL.

I've disabled and cleared the CouchCMS cache local and on server.

Note that this is an installation which is running NOT in the site document root + 'couch' - by use of a symlink as described in my own answer to my own thread here (related?):

viewtopic.php?f=2&t=11640

Can't work out what the heck has gone wrong. Any ideas?
I think you need to concentrate only on the last template that you added before this error cropped up.
Take a look all <cms:editable> definitions within it - one would likely have a Capital letter somewhere in its name. If found, change that to lowercase and *visit the template as super-admin* for the change to be picked up by Couch.

Thanks for your input!

There's definitely no disallowed characters in it.

I've copied it verbatim to a new file, and that works fine as a template.

I deleted it then re-created it with the content of it's clone, same problem.

Is it possibly because the file in question is called 'server.php' - is that a reserved filename?

Or is it something cached or set somewhere in the DB perhaps.

The investigation continues....

(everything was going so well earlier when I sussed the simlink solution to nested gits!)
Could you please try the following? -
viewtopic.php?f=5&t=11105&start=10#p28998

Please let me know if it helps.

Did that. Uploaded then hard refreshed the template - reloaded - etc etc. Same result I'm afraid. Odd one. I use Couch elsewhere with much success.

Is there a way I can give you credentials to take a look?
Yes, please PM me your site's FTP + Couch creds and I'll take a look (it is quitting time for me now here, though, so will do that when I come back).
Thanks for the creds.

I had a look and found the problem to be this -
there was an editable region containing some invalid characters (capital letters) in its name (MainContern). Instead of fixing the name, the region was removed from the template. Now, removing does not delete a region as this has to be done from the admin-panel. The admin-panel, however, was balking at encountering the invalid name. Basically a Catch-22 situation.

I have pushed a commit to GitHub fixing this issue so such a scenario shouldn't arise any more.

Thanks for the heads-up.
7 posts Page 1 of 1