Page 1 of 1

[Solved] Unable to add or edit pages

Posted: Fri Oct 17, 2014 4:55 pm
by 4mica
Just upgraded from 1.11 to 1.11.11
Apache version 2.2.29
PHP version 5.4.32
MySQL version 5.6.16
Operating system linux

When attempting to add or edit a page now, I get the following error:
Fatal error: Call to a member function TemplateId() on a non-object in /home/.../public_html/plugins/function.stylesheet.php on line 56

I believe the error refers to this line:
$template_id=$content_obj->TemplateId();

***Further examination shows:

I can get the backend to work by deleting the /plugins/functions.stylesheet.php file, but when I do that, the front end shows this message:
Error: at line 9 in file /home/.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:
Message:
Syntax error in template "tpl_head:20" on line 9 "{stylesheet}" unknown tag "stylesheet"


I'm unable to change {stylesheet} to {cms_stylesheet} in my templates without getting this message:
Fatal error: Uncaught --> Smarty: Call of unknown method '_dummyDfltPluginHandler'. <-- thrown in /home/.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php on line 819

Re: Unable to add or edit pages

Posted: Fri Oct 17, 2014 6:39 pm
by Jo Morg
4mica wrote:How do I rectify this?
By doing a search in the forums. This has been widely discussed and detailed instructions on how to solve it are on several posts already.
The short answer: look in your templates for {stylesheet} and replace them by {cms_stylesheet}. Still: do a search, there are a few more steps...

Re: Unable to add or edit pages

Posted: Fri Oct 17, 2014 7:22 pm
by 4mica
Thanks for the quick response but as I said in my original post, I can't change {style} to {cms_style}... just get an error message. I've searched the forum fairly exhaustively, but will keep searching. If anyone else knows how to fix this, let me know!

Re: Unable to add or edit pages

Posted: Fri Oct 17, 2014 7:58 pm
by Jo Morg
4mica wrote:Thanks for the quick response but as I said in my original post, I can't change {style} to {cms_style}...
Well... look at the timestamps... When I replied you didn't have that bit of info. You edited it later.
So: let's start over...

- find and rename:
-- file CMS_ROOT/plugins/function.stylesheet.php;
-- file CMS_ROOT/stylesheet.php;

At this point you should be able to access and edit your templates and find the occurrences of {stylesheet} and replace them by {cms_stylesheet}.
Additionally you will have to edit the stylesheets in order to replace url(uploads/folder/imagefilename.jpg)
with url([[root_url]]/uploads/folder/imagefilename.jpg).
After this clear CMSMS cache, and test if all is well.
If this doesn't work the alternative is to access the database directly, but lets avoid this by following the steps recommended...
HTH

Re: [Solved] Unable to add or edit pages

Posted: Fri Oct 17, 2014 8:30 pm
by 4mica
Still couldn't edit the templates but I dove into the database and changed to {cms_stylesheet} there.

It looks like everything is hunky-dory now-- thanks so much for your help!!