MODX Community

Bug in modx 2.8

Summary

I just updated to modx 2.8
Now, when I try to edit a page with children (a container) I get this error:
Fatal error : Uncaught --> Smarty Compiler: Syntax error in template “file:/var/www/vhosts/XXXXX.XX/httpdocs/manager/templates/default/element/tv/renders/input/url.tpl” on line 42 “,listeners: {‘keydown’: {fn:MODx.fireResourceFormChange, scope:this}}” - Unexpected ": ", expected one of: “}” <-- thrown in /var/www/vhosts/XXXX.XXX/httpdocs/core/model/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 42

update: just found out some pages without children have this same problem

Step to reproduce

update (of install?) modx 2.8 and click on a (parent-)page

Environment

Apache PHP 7.3

Do those pages have a “URL” template variable? Does it happen if you create a new resource without a template assigned to it?

These pages do have template variables, [[but non type URL.]] -> edit: yes, some are type URL.

It seems I can’t create new pages… same error.

Does it help if you clear the MODX cache?

Nope, was the first thing I tried. Sorry I forgot to mention.

Thanks, I can confirm this bug. It happens when you have a URL Template Variable assigned to a template. Opening a resource with this particular template results in a fatal error.

1 Like

You are right, I double-checked and I do have url-type variables. Hope this bug can be fixed very soon.

Maybe you can fix the error if you surround this line with {literal}...{/literal}.

2 Likes

Related pull request: https://github.com/modxcms/revolution/pull/15279

You are a life-saver. Thanks.
Works like a charm again.

Huge respect for acting this quick. Superb.

The fix has been merged, a 2.8.1 release will come soon.

2 Likes

So to be clear are we talking about line 42 reading:

{literal},listeners: {'keydown': {fn:MODx.fireResourceFormChange, scope:this}}{/literal}

You can see the exact changes in the pull request: https://github.com/modxcms/revolution/pull/15279

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.