Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chameleon incorrectly tries to parse $ vars in text #21

Closed
thet opened this issue Jul 21, 2011 · 2 comments
Closed

chameleon incorrectly tries to parse $ vars in text #21

thet opened this issue Jul 21, 2011 · 2 comments

Comments

@thet
Copy link
Contributor

thet commented Jul 21, 2011

it seems that chameleon tries to parse text as a variable which is actually not a variable, like $name in a construct like:

<div class="formHelp" i18n:translate="help_parameter_expressions">
    refer to a parameter by <code>$name</code>. Parameters
</div>

this is the case with plone.app.theming's controlpanel in https://svn.plone.org/svn/plone/plone.app.theming/trunk/src/plone/app/theming/browser/controlpanel.pt, line 265, column 55.

i got this traceback:

2011-07-21 17:54:13 ERROR Zope.SiteErrorLog 1311263653.560.501985316358 http://localhost:8080/g24/@@theming-controlpanel
Traceback (innermost last):
  Module ZPublisher.Publish, line 126, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 46, in call_object
  Module plone.app.theming.browser.controlpanel, line 36, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 113, in pt_render
  Module five.pt.patches, line 127, in __call__
  Module z3c.pt.pagetemplate, line 118, in render
  Module chameleon.zpt.template, line 107, in render
  Module chameleon.template, line 167, in render
  Module controlpanel_f1c1a3e882c2597ae2ca97f39b8626ac0b234ae8, line 6307, in render
  Module e66da8b7fb7861e0dbe5431d7f1d4d35dca3bca3, line 302, in render_master
  Module a7c28bb6cca4cd87571651e62cefc41c8672572d, line 2395, in render_master
  Module e66da8b7fb7861e0dbe5431d7f1d4d35dca3bca3, line 273, in __fill_content
  Module a7c28bb6cca4cd87571651e62cefc41c8672572d, line 1033, in render_content
  Module e66da8b7fb7861e0dbe5431d7f1d4d35dca3bca3, line 255, in __fill_main
  Module controlpanel_f1c1a3e882c2597ae2ca97f39b8626ac0b234ae8, line 3534, in __fill_prefs_configlet_main
  Module chameleon.utils, line 228, in __getitem__
NameError: name

where the compiled template around 3534 reads:

        # <Expression u'name' (264:55)> -> __content_141865920
        try:
            __content_141865920 = _static_183635180(getitem('name'), getitem('request'), True)
        except:
            rcontext.setdefault('__error__', []).append((u'name', 264, 55, '/home/thet/.buildout/eggs/plone.app.theming-1.0b8-py2.6.egg/plone/app/theming/browser/controlpanel.pt', _sys.exc_info()[1], ))
            raise
@maciekz
Copy link

maciekz commented Jul 22, 2011

I also confirm this issue. I've had it when using "$j" for calling jQuery in javascript code inside a <script> tag.

@malthe
Copy link
Owner

malthe commented Jul 25, 2011

Fixed.in b5a2160.

This change is included in today's 2.1 release.

@malthe malthe closed this as completed Jul 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants