comments module: smarty error straight from the box

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
admsh
Forum Members
Forum Members
Posts: 93
Joined: Tue Aug 19, 2008 6:30 pm
Location: NY

comments module: smarty error straight from the box

Post 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}
casidougal
Forum Members
Forum Members
Posts: 98
Joined: Tue Jun 06, 2006 10:08 pm
Location: USA

Re: comments module: smarty error straight from the box

Post 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
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: comments module: smarty error straight from the box

Post 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.
Last edited by tyman00 on Wed May 13, 2009 2:36 pm, edited 1 time in total.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
casidougal
Forum Members
Forum Members
Posts: 98
Joined: Tue Jun 06, 2006 10:08 pm
Location: USA

Re: comments module: smarty error straight from the box

Post 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.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: comments module: smarty error straight from the box

Post 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.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
gap_tooth_clan

Re: comments module: smarty error straight from the box

Post 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
Pieter
New Member
New Member
Posts: 4
Joined: Fri Feb 01, 2008 9:26 pm

Re: comments module: smarty error straight from the box

Post 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>
Last edited by Pieter on Fri Jun 26, 2009 12:04 am, edited 1 time in total.
Pieter
New Member
New Member
Posts: 4
Joined: Fri Feb 01, 2008 9:26 pm

Re: comments module: smarty error straight from the box

Post 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.
Post Reply

Return to “Modules/Add-Ons”