Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I'm getting this error:
ERROR! TAG_NAME: Invalid char " " in tagname (line: 137 char: 4506)

That line in my code (currently) is the "global" line in this snippet:
Code: Select all
<cms:php>
  global $CTX;
  if(is_numeric(substr($CTX->get('TUE_desc'), 0, 1))) $CTX->set('TUE_numeric', 'True', 'global');
</cms:php>


I say "currently" because even if I add lines ahead of the offending line, the error message continues to point to line 137.

I used this line:
<cms:set TUE_desc = '' 'global'/>
to set the value earlier in the program. (That's a pair of single-quotes, not a double-quote.)

Any ideas on the true nature of the error?
Hi,

There is no error in the piece of code you posted. I tested the following and it works fine -
Code: Select all
<cms:set TUE_desc = '5' 'global'/>

<cms:php>
  global $CTX;
  if(is_numeric(substr($CTX->get('TUE_desc'), 0, 1))) $CTX->set('TUE_numeric', 'True', 'global');
</cms:php>

<cms:show TUE_numeric />

So, you'll have to concentrate on the rest of your template to find the offending line.
The error, as reported, will be in some tag name (i.e. the string that follows '<cms:').
One not uncommon error is to put a space immediately after the colon.

Hope this helps.
If you have any difficulty, post in the full template.

Thanks.
2 posts Page 1 of 1