Getting smarty warnings because of {} brackets

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
radon
New Member
New Member
Posts: 4
Joined: Wed Nov 23, 2011 7:27 pm

Getting smarty warnings because of {} brackets

Post by radon »

Hi

I recently converted my old joomla page to cmsmadesimple (latest as of now) and run in the following problem:

On several pages, I see error messages, that smarty could not recognize certain tags, because it mistook them as tags, which they aren't. For example in some texts there are still some {mospagebreak title="whatever"} tags flying around which divided the joomla article in multiple pages. For this, I created an own custom tag which does nothing, so those get filtered out.

Now I have many articles, where the {} brackets are used in different kind of ways, some use it as clantags or whatelse.

My question is: How can I prevent smarty from throwing these errors?

Going through each article by hand is out of the question, they're just too many.

I don't use any custom modules yet, only my own UDTs which shouldn't interfere here.
mrenigma
Forum Members
Forum Members
Posts: 48
Joined: Fri Aug 05, 2011 3:43 pm

Re: Getting smarty warnings because of {} brackets

Post by mrenigma »

As far as I am aware if you are attempting to call Smarty tags/plug-ins which are not built or added onto CMSMS then you will get these errors.

I think the only thing you can do is go through and clear them all or alternatively look for plug-ins which you can add to CMSMS which will duplicate the Joomla functionality.

Cheers
mrenigma
uniqu3

Re: Getting smarty warnings because of {} brackets

Post by uniqu3 »

Use {ldelim} and {rdelim} for { } when it'S not smarty tag.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Getting smarty warnings because of {} brackets

Post by Wishbone »

If it's not feasable to modify all your pages, you might be able to leverage the "ContentPreCompile" event (Extensions -> Event Manager) and point it to a UDT that inserts {literal} and {/literal} around the content before rendering. I've never done this before.. just theoretical. The downside to this is that you can't use any smarty in your pages.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Getting smarty warnings because of {} brackets

Post by calguy1000 »

Or just manually implement stub UDT's for all of those joomla tags that are not compatible.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
radon
New Member
New Member
Posts: 4
Joined: Wed Nov 23, 2011 7:27 pm

Re: Getting smarty warnings because of {} brackets

Post by radon »

Actually I'm getting a whole lot more errors, not all related to the brackets itself lately as I pick some articles at random and see what error messages smarty is throwing. For example this:

Code: Select all

string(142) "Smarty error: [in content:content_en line 188]: syntax error: expecting '=' after attribute name 'Tool' (Smarty_Compiler.class.php, line 1558)" string(146) "Smarty error: [in content:content_en line 188]: syntax error: expecting '=' after attribute name 'Tutorial' (Smarty_Compiler.class.php, line 1558)" string(145) "Smarty error: [in content:content_en line 188]: syntax error: expecting '=' after attribute name '(Teil2)' (Smarty_Compiler.class.php, line 1591)" string(142) "Smarty error: [in content:content_en line 269]: syntax error: expecting '=' after attribute name 'Tool' (Smarty_Compiler.class.php, line 1558)" string(146) "Smarty error: [in content:content_en line 269]: syntax error: expecting '=' after attribute name 'Tutorial' (Smarty_Compiler.class.php, line 1558)" string(145) "Smarty error: [in content:content_en line 269]: syntax error: expecting '=' after attribute name '(Teil3)' (Smarty_Compiler.class.php, line 1591)" 
I can't see any brackets there, apparently it even mistakes some characters or word parts as control structures? This is totally weird. I hope it'll be fixed as soon as I get rid of the smarty-parser inside my articles.

Anyone has seen this before?
radon
New Member
New Member
Posts: 4
Joined: Wed Nov 23, 2011 7:27 pm

Re: Getting smarty warnings because of {} brackets

Post by radon »

Wishbone wrote:If it's not feasable to modify all your pages, you might be able to leverage the "ContentPreCompile" event (Extensions -> Event Manager) and point it to a UDT that inserts {literal} and {/literal} around the content before rendering. I've never done this before.. just theoretical. The downside to this is that you can't use any smarty in your pages.
Doesn't seem to work... I need some help with this.

I tried adding this as a UDT:

Code: Select all

$params['content'] = '{literal}'.$params['content'].'{/literal}';
var_dump($params['content']);

die('FUUU');
And added the tag to the event ContentPreCompile AND SmartyPreCompile.
Doesn't change a thing, apparently those aren't even called when compiling a smarty template.

I used an article which was not cached yet to test it out, so caching is not an issue here.

Any help? As it is right now, I can't use cmsms for my page, it just throws those damn errors around for any reason...
radon
New Member
New Member
Posts: 4
Joined: Wed Nov 23, 2011 7:27 pm

Re: Getting smarty warnings because of {} brackets

Post by radon »

no ideas? ???

I really need help with this :'(
Post Reply

Return to “CMSMS Core”