Page 1 of 1
comments module: smarty error straight from the box
Posted: Wed May 06, 2009 11:19 pm
by admsh
i've installed the latest version of "comments" and added it to my news template. i haven't changed a thing in the comments template andf i've installed the two modules it is dependant of.
i get this error on the page:
Code: Select all
string(170) "Smarty error: [in module_db_tpl:Comments;default_display line 36]: syntax error: unrecognized tag: $smarty.session.Comments.message) (Smarty_Compiler.class.php, line 446)" string(138) "Smarty error: [in module_db_tpl:Comments;default_display line 36]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)
for the time being i've just removed all "$smarty.session.Comments.message" from my template, and everything works fine. but i wonder if it's needed? seems like my comments module won't display errors now to the user, which can't be good... i've had to remove this whole part of my comments template:
Code: Select all
{if isset($smarty.session.Comments.error)}
{* display an error message from the comments module *}
<div style="text-size: 1.5em; color: red;">{$smarty.session.Comments.error}</div>
{elseif isset($smarty.session.Comments.message)}
{* display an optional message from the comments module *}
<p style="text-size: 1.5em; color: green;">{$smarty.session.Comments.message)}</p>
{/if}
Re: comments module: smarty error straight from the box
Posted: Wed May 13, 2009 1:46 am
by casidougal
Same exact problem on a fresh install of 1.5.4
Comment module 1.9.2, CGExtensions 1.15.3, CGSimplesmarty 1.4.1 (all the most recent versions)
As a side comment, I'm a bit unsettled on the direction CMSMS 1.5.x versions . . . I've experienced many more buggy and instability issues with these newer versions as compared to 1.4. The whole concept of having to stack different modules for basic functionality like comments & RSS feeds seems like the wrong direction to be headed.
Code: Select all
string(170) "Smarty error: [in module_db_tpl:Comments;default_display line 36]: syntax error: unrecognized tag: $smarty.session.Comments.message) (Smarty_Compiler.class.php, line 446)" string(138) "Smarty error: [in module_db_tpl:Comments;default_display line 36]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
Current PHP Version (phpversion):
5.2.6
MySQL 5.0.67
Linux, apache
Re: comments module: smarty error straight from the box
Posted: Wed May 13, 2009 2:35 pm
by tyman00
casidougal wrote:
As a side comment, I'm a bit unsettled on the direction CMSMS 1.5.x versions . . . I've experienced many more buggy and instability issues with these newer versions as compared to 1.4. The whole concept of having to stack different modules for basic functionality like comments & RSS feeds seems like the wrong direction to be headed.
Unfortunately I am not of much help with your issue. I've installed the comments module a few times recently with out any issues. You may want to look into the CGFeedback module, it could fit the bill and it may even add a few extra features you can use.
On a side note: I however do highly disagree with the above statement. 1.4 was a great release, but all of the 1.5.x releases have been even better. Why? Security. A lot of security features have been added that prevent your site from cross site scripting attacks. Some of these features have caused some issues with modules, but I believe this is an unfortunate price to pay to keep your site from getting into the wrong hands.
I also think that the idea of stacking modules is a great idea. Why add these functions to 20 different modules when you can build a single module that will handle it all. It saves time for the developers, it saves development costs for those sponsoring modules, it allows designers (like you and me) to only have to learn how to handle these functions once instead of learning how to handle these things in 20 different ways because each module developer did it differently. It also reduces the size of your installation because you only have to install the files for comments or RSS once instead of for each module you need to use it for. It probably also speeds up your site because it is making less calls to get the job done.
Finally, it allows designers to add the functionality to modules that probably would never support it. A great example is RSS for the Albums module. Development has been dropped for that module by the developer so getting RSS feeds for that module would be difficult and expensive. However to get the job done with a stacked module all I had to do was install CGFeedMaker and tweak the template a little. It didn't cost me anything but a little bit of my time. Something that would have likely cost hundreds of dollars in custom programming to add to the module. If it weren't for CGFeedMaker I'd have spent thousands of dollars already adding RSS functionality to various modules.
Re: comments module: smarty error straight from the box
Posted: Sun May 17, 2009 8:37 pm
by casidougal
Thanks for the reply. I do agree that security is a good thing but in my opinion better security on a less stable system is not worth the trade-off. I should clarify that it's not with the core I'm having issues but with modules that I use for almost every install . . . form builder, RSS, Comments and Captcha. Since versions 1.5.x there has been a marked increase for me in instability and buggy behavior relating to these modules.
I appreciate what you say about stacking modules and I would totally agree with you . . . if they were part of the core. As it is now, these vital modules (at least for me) seem to be on their own separate development path which may or may not be in sync with the core and may or may not be counted on for stability.
Re: comments module: smarty error straight from the box
Posted: Mon May 18, 2009 5:05 am
by tyman00
Unfortunately, I am going to have to say your situation is not the "norm." I have all of the modules you've mentioned above running on numerous sites both pre and post 1.5 without any issues. I haven't heard much as far as issues that relate to yours, especially since the improvements and changes of 1.5.4 that made the security improvements more stable.
My stacking opinion still stands. In my opinion these modules actually grow from the use of other modules. One module might need an extra functionality so the other module that would be stacked on it will be improved to accept this additional functionality.
Re: comments module: smarty error straight from the box
Posted: Tue May 19, 2009 1:30 pm
by gap_tooth_clan
I have had this error too. i only got the error the first time I went onto the comments page and after that it disappeared.
Also I was having problems with my site on my local machine i had installed the comments module and front_end_users and custom content, but the comments module would cause my apache to crash when submitting the form. After restarting apache the comment had appeared. I tried uninstalling the module and retrying but to no avail.
i have now set up the same account on my server and all works fine. The only real difference is the order in which I installed the modules.
On my local machine the order went something like:
front end users --> custom content --> comments --> cgextensions --> cgsmarty
front end users --> custom content --> cgextensions --> cgsmarty --> comments
Re: comments module: smarty error straight from the box
Posted: Thu Jun 25, 2009 11:26 pm
by Pieter
I've experienced the error myself as well, as a first time installer of the comments module. I don't get the error message often, but when it appears it does so once. After a page refresh it disappears.
Code: Select all
string(170) "Smarty error: [in module_db_tpl:Comments;default_display line 35]: syntax error: unrecognized tag: $smarty.session.Comments.message) (Smarty_Compiler.class.php, line 446)"
string(138) "Smarty error: [in module_db_tpl:Comments;default_display line 35]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
I'm not a PHP expert, but isn't this error caused by the extra ')' after the $smarty.session.Comments.message in the original code?
File: \modules\Comments\templates\default_display.tpl:
Code: Select all
<p style="text-size: 1.5em; color: green;">{$smarty.session.Comments.message)}</p>
Re: comments module: smarty error straight from the box
Posted: Wed Jul 01, 2009 10:59 pm
by Pieter
By the way, the same typo is also stored in the database, in the cms_module_templates table (assuming here your table prefix is set to "cms_"). I opened up the database with phpmyadmin, modified the record by deleting the ')' mentioned in my previous post, and the error hasn't happened since.