Error with Smarty in Plugin Comment

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.
Locked
thomsen

Error with Smarty in Plugin Comment

Post by thomsen »

Hi , i wantet to use the comment pluging.
I createt a new content section with the plugin tag and everything works untill the users press the submit button.
The comment is written into Mysql ( and shown on next view of the comment-side ) but this message apears :

Warning: Smarty error: unable to read resource: "db:7?CMSSESSID=7efdf4ad7331919a18dafce41f48c1b6" in /raid/domains/de/p/philter-music/htdocs/www/lib/smarty/Smarty.class.php on line 1088

Anybody got an idea ?
Robin

Error with Smarty in Plugin Comment

Post by Robin »

I have a similar problem, whenever I add a comment I get this error:
Warning: Smarty error: unable to read resource: "db:6?CMSSESSID=f71ac381f17cd27dc316ffbfb5bf5205" in /home/robin/public_html/cms/lib/smarty/Smarty.class.php on line 1088
But then I can see the comment after it's added, so I'm not sure what the problem is. By the way, line 1088 is:
trigger_error("Smarty error: $error_msg", $error_type);
But that's probably not of much use.
thomsen

Error with Smarty in Plugin Comment

Post by thomsen »

i think line 1088 ist just the function which return the errors smarty had ...
Robin

Error with Smarty in Plugin Comment

Post by Robin »

thomsen wrote:i think line 1088 ist just the function which return the errors smarty had ...
Yeah that's what I figure, but I had too much time on my hands.
Robin

Error with Smarty in Plugin Comment

Post by Robin »

:bump:

Any answers??
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Error with Smarty in Plugin Comment

Post by Ted »

I just tested it locally, and it works fine. Anyone else?
Robin

Error with Smarty in Plugin Comment

Post by Robin »

I'm using PHP version 4.3.10, maybe that makes a difference??
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Error with Smarty in Plugin Comment

Post by Ted »

Me too
Thomsen

dirty workaround

Post by Thomsen »

Here is a dirty, but working "solution" for this prob.:

Open file /modules/Comments/modulefunctions.php

Line 100: cms_mapi_redirect_user_by_pageid($return_id);
replace with echo "ok, if you dont like to"; or something like this.

Line 141 : cms_mapi_redirect_user_by_pageid($return_id);
replace with echo "thanx for your entry"; or something like this.

Thomas
matt

Re: Error with Smarty in Plugin Comment

Post by matt »

OK, so the reason here seems to be that the URL to which execution is redirected has the CMSSESSID given with '?' to separate attributes. Like this:
http://www.yourdomain.com/index.php?pag ... 191f6c00cc

and some newer PHP versions seem to have solved this problem.

It woud help if there was no CMSSESSID set (no attributes), like this:
http://www.yourdomain.com/index.php?page=Forum

or if '&' was used as a separator instead of '?', like this:
http://www.yourdomain.com/index.php?pag ... 191f6c00cc

One can do both and it was described here how to do it:
http://forum.cmsmadesimple.org/index.ph ... 620.0.html

But I don't have access to my php.ini and setting it in .htaccess doesn't work. Any ideas how to set any of these other way?
Locked

Return to “CMSMS Core”