Page 1 of 2

Problem with admin pages...

Posted: Wed Apr 09, 2014 6:58 am
by Mats Helge
Hi, I have installed (upgraded) 1.11.6 "Merchena" some time ago and now noticed after some time since my last update, that my admin pages are a total mess. Getting a lot of errors on the top of the page. This is what it says when I try to access my content->pages:

Code: Select all

Strict Standards: Declaration of HTMLArea::WYSIWYGGenerateHeader() should be compatible with CMSModule::WYSIWYGGenerateHeader($htmlresult = '') in /home/..../modules/HTMLArea/HTMLArea.module.php on line 234

Strict Standards: Declaration of HTMLArea::WYSIWYGTextarea() should be compatible with CMSModule::WYSIWYGTextarea($name = 'textarea', $columns = '80', $rows = '15', $encoding = '', $content = '', $stylesheet = '', $addtext = '') in /home/..../modules/HTMLArea/HTMLArea.module.php on line 234

Strict Standards: Declaration of SPAWeditor::WYSIWYGGenerateHeader() should be compatible with CMSModule::WYSIWYGGenerateHeader($htmlresult = '') in /home/..../modules/SPAWeditor/SPAWeditor.module.php on line 155

Strict Standards: Declaration of SPAWeditor::WYSIWYGTextarea() should be compatible with CMSModule::WYSIWYGTextarea($name = 'textarea', $columns = '80', $rows = '15', $encoding = '', $content = '', $stylesheet = '', $addtext = '') in /home/..../modules/SPAWeditor/SPAWeditor.module.php on line 155
Output has already been sent to the browser at /home/..../modules/HTMLArea/HTMLArea.module.php:234. Please make sure the command $xajax->processRequest() is placed before this.
Can anyone tell me what this means, what should I install or to do?

Thanks a lot!

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 8:16 am
by velden
I don't know the 'HTMLArea' module but apparently it is not following strict rules of php programming for your version of php.

I think you have enabled E_STRICT php error reporting

Maybe your hosting provider has upgraded php to 5.4?

Try to use .htaccess to disable E_STRICT error reporting.

If you don't need the HTMLArea module (and you know that for sure) you could uninstall it.

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 8:41 am
by Mats Helge
Thanks,

I uninstalled the HTMLArea module, but the problems persist. Here is the new error when trying to go to content->pages

Code: Select all

Strict Standards: Declaration of SPAWeditor::WYSIWYGGenerateHeader() should be compatible with CMSModule::WYSIWYGGenerateHeader($htmlresult = '') in /home/..../modules/SPAWeditor/SPAWeditor.module.php on line 155

Strict Standards: Declaration of SPAWeditor::WYSIWYGTextarea() should be compatible with CMSModule::WYSIWYGTextarea($name = 'textarea', $columns = '80', $rows = '15', $encoding = '', $content = '', $stylesheet = '', $addtext = '') in /home/..../modules/SPAWeditor/SPAWeditor.module.php on line 155
Output has already been sent to the browser at /home/..../modules/SPAWeditor/SPAWeditor.module.php:155. Please make sure the command $xajax->processRequest() is placed before this.
After this I went to global settings and set the frontend wysiwyg to tinyMCE.

I also tried to add "php_flag display_errors off" to htaccess-file, but it completely blocked the use of the admin pages.

By the way, is there a way to modify contents of a page through database directly? I tried to find it, but only found all other info about the page but the content-text.

Thanks again!

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 9:22 am
by staartmees
Are you sure SPAW-editor is suitable for CMS Made Simple; I can't find in the module repository.
The website of SPAWeditor is closed.

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 9:36 am
by Mats Helge
Thanks again, closing in on the answer. I removed the SPAWeditor (I have to admit I dont know what it was doing there, dont remember installing anything like that).

Now I dont get errors when browsing in admin, and I can open the pages-list. When I try to access some page I get error:

Code: Select all

Fatal error: Call to a member function TemplateId() on a non-object in /home/..../plugins/function.stylesheet.php on line 56
The line 56 is as follows:

Code: Select all

  $template_id=$content_obj->TemplateId();
I tried and I can access my templates and modify them, nothing seems to be wrong there.

How should I proceed?

Thanks a million already :)

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 9:44 am
by staartmees
If you have a fresh install of CMSMS 1.10.x or greater, not an upgrade, some of these themes will give a smarty error related to {stylesheet}, this plugin has been removed from CMSMS distributions. use {cms_stylesheet} instead.

a) Open the template of the theme;
b) Search for {stylesheet};
c) Replace {stylesheet} with {cms_stylesheet};
d) Save template;
e) Open style sheets and change image calls:
old url(uploads/folder/image.jpg)
new url([[root_url]]/uploads/folder/image.jpg)

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 10:22 am
by Mats Helge
I managed to change my home-page's template from stylesheet to cms_stylesheet. And I changed the imagelinks on the stylesheet the way you said. After this my site did not load anything on refresh, just an empty page. I changed a different page as the default page and then it worked. It was also ok to browse from my menu to the home-page and it worked ok.

When I tried to modify other templates I got this error:

Code: Select all

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home/simojoen/public_html/lohiranta/tmp/templates_c/wrt53451dc9a514a1.62235571' in /home/.../lib/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/.../lib/smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/home/....', '<?php /* Smarty...', Object(Smarty_Parser)) #1 /home/..../lib/classes/class.Smarty_Parser.php(245): Smarty_Internal_Template->compileTemplateSource() #2 /home/simojoen/public_html/..../admin/edittemplate.php(137): Smarty_Parser->fetch('template:appdat...') #3 {main} thrown in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php on line 44
...and I still cant edit pages. Here's what it says when I try:

Code: Select all

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home/..../tmp/templates_c/wrt53451e8a934988.13392950' in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/..../lib/smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/home/.../...', '<?php /* Smarty...', Object(Smarty_Parser)) #1 /home/..../lib/classes/class.Smarty_Parser.php(245): Smarty_Internal_Template->compileTemplateSource() #2 /home/..../lib/classes/contenttypes/Content.inc.php(453): Smarty_Parser->fetch('template:23') #3 /home/..../lib/classes/contenttypes/Content.inc.php(436): Content->parse_content_blocks() #4 /home/..../lib/classes/contenttypes/Content.inc.php(206): Content->get_content_blocks() #5 /home/..../lib/classes/contenttypes/Cont in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php on line 44
Thanks

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 10:27 am
by Jo Morg

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 10:55 am
by Mats Helge
The problem is that when I try to edit my Template and Submit the screen goes white and says:

Code: Select all

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home..../tmp/templates_c/wrt53452511326717.92472063' in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/..../lib/smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/home/..../...', '<?php /* Smarty...', Object(Smarty_Parser)) #1 /home/..../lib/classes/class.Smarty_Parser.php(245): Smarty_Internal_Template->compileTemplateSource() #2 /home/simojoen/public_html/..../admin/edittemplate.php(137): Smarty_Parser->fetch('template:appdat...') #3 {main} thrown in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php on line 44
I have my home-page using cms_stylesheet but still I cant modify the page contents.

Was there a way to change stylesheet->cms_stylesheet directly from database? Somehow I remember reading about it from somewhere.

Can I just upgrade some newer version over the top of my existing one and get these problems fixed automatically?

Thanks!

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 11:07 am
by Jo Morg
Mats Helge wrote: When I try to access some page I get error:

Code: Select all

Fatal error: Call to a member function TemplateId() on a non-object in /home/..../plugins/function.stylesheet.php on line 56
The line 56 is as follows:

Code: Select all

  $template_id=$content_obj->TemplateId();
Did you try the suggested fix? Those files HAVE to be removed.

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 11:20 am
by Mats Helge
Yes, I removed CMS_ROOT/plugins/function.stylesheet.php
and CMS_ROOT/stylesheet.php

Now I cannot access my Site Admin -section at all, it gives me this:

Code: Select all

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file /home/simojoen/public_html/lohiranta/tmp/templates_c/wrt53452bcf9e2946.45660299' in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php:44 Stack trace: #0 /home/..../lib/smarty/sysplugins/smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('/home/..../...', '<?php /* Smarty...', Object(Smarty_CMS)) #1 /home/..../lib/smarty/sysplugins/smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource() #2 /home/..../lib/classes/class.Smarty_CMS.php(323): Smarty_Internal_TemplateBase->fetch('siteprefs.tpl', NULL, NULL, NULL, true, false, false) #3 /home/..../lib/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_CMS->fetch('siteprefs.tpl', NULL, NULL, NULL, true) #4 /home/..../admin/siteprefs.php(637): Smarty_Internal_ in /home/..../lib/smarty/sysplugins/smarty_internal_write_file.php on line 44
Although I have removed the two files and changed the stylesheet->cms_stylesheet to my home-page when I go to the site and check out the source there it still says:

Code: Select all

<link rel="stylesheet" type="text/css" href="http://www...../tmp/cache/stylesheet_combined_500c85a20ac328e230fffeb4476fd552.css" media="all" />
Now I cant go and empty my cache from system maintenance, can I just empty some folder on the server, or could this be a cache issue?

Thanks

Re: Problem with admin pages...

Posted: Wed Apr 09, 2014 11:37 am
by Jo Morg
Mats Helge wrote: Now I cant go and empty my cache from system maintenance, can I just empty some folder on the server, or could this be a cache issue?

Thanks
You can, but I wonder if you don't have permission issues on the cache folders... they must be writable for the PHP process (0644 or 0755)

Re: Problem with admin pages...

Posted: Thu Apr 10, 2014 8:13 am
by Mats Helge
gosh, the problems keep piling...

Now I cant see the page at all anymore. There is no change in the admin-pages. There are a couple new error lines visible above the pages list in my admin:

Code: Select all

Warning: fread(): Length parameter must be greater than 0 in /home/..../lib/classes/class.contentoperations.inc.php on line 554

Warning: get_class() expects parameter 1 to be object, boolean given in /home/.../lib/classes/class.contentoperations.inc.php on line 559
I already emptied tmp/cache and tmp/templates_c

I cannot modify pages.

I cannot modify templates.

I cannot view the website, I just get an empty white page.

If you have any tips, thanks for sharing them.

Re: Problem with admin pages...

Posted: Thu Apr 10, 2014 8:32 am
by velden
The only thing I can think of now is file/directory permission issues in your /tmp folder

What I would try is chmod 777 RECURSIVELY for files and directories
/tmp/cache
/tmp/templates_c

Afterwards double check the permissions are actually set.
Then delete contents of tmp/cache folder (except for index.html)

Some web server configurations don't allow for 777 permissions. (You'll know fast enough). If so then try 755 permissions

Re: Problem with admin pages...

Posted: Thu Apr 10, 2014 8:46 am
by Mats Helge
Permissions set to 777 and folders emptied except for index.html.

This removed the two errors from pages menu, but still no way of modifying the pages or templates and I can't see the website.

Any other advice? Anyone?

Thanks