Page 1 of 2

Pages display unformatted menus only - php error recorded - new install

Posted: Thu Dec 30, 2010 7:46 pm
by PaulMacFarlane
[30-Dec-2010 11:16:05] PHP Fatal error:  Cannot use object of type stdClass as array in C:\www\MHCMS\tmp\templates_c\News^%%18^18E^18E3D89C%%module_db_tpl%3ANews%3BsummarySample.php on line 26

The pages display the menu structure only and no articles. At first I thought it was missing a CSS file but then realized the default news article was not showing.

This is a brand new install with all defaults.  I have installed this CMS successfully before on another server.  The only differences I can recall is my other server has ZEND on it - but I did not see that requirment.

It's like the templates aren't processing.  Wiped out the installations and re-installed with the same result. Suggestions?

Re: Pages display unformatted menus only - php error recorded - new install

Posted: Thu Dec 30, 2010 9:55 pm
by PaulMacFarlane
FYI: Running PHP 5.3.4 w/FastCGI on IIS6 w/MySql5.5.8 and CMS 1.9.2....

PHP seems to be running fine.  Config gave me all green on CMS install. No errors at all.

Document attached is a home page snapshot...

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 5:26 pm
by PaulMacFarlane
Anyone? Anything?

Am I asking the questions wrong?

Apparently the attachment quota has been reached... hmm..

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 5:40 pm
by calguy1000
[30-Dec-2010 11:16:05] PHP Fatal error: Cannot use object of type stdClass as array in C:\www\MHCMS\tmp\templates_c\News^%%18^18E^18E3D89C%%module_db_tpl%3ANews%3BsummarySample.php on line 26
This Indicates an error on line 26 of your news module summary template named 'Sample'. It indicates that you are using array accessors (. or []) where a -> is needed because the item is an object.

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 6:27 pm
by PaulMacFarlane
Thanks Calguy....

But that leads the question as to why? This is a totally default install. I have not modified anything. Just did the default install with sample pages..

Does this mean one of my prerequisites are not configured correctly? Is the CMS code not compatible with the latest PHP?

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 7:03 pm
by Dr.CSS
Look in your system info page to see if any yellow ! or red X...

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 7:20 pm
by PaulMacFarlane
On the main page the only ! showing is regarding the mailer..

On the system info the only X is:
config_file: 0666 config.php writable. It is more safe if you change permission to read-only

Everything else is green.... or no mark at all....

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 7:27 pm
by calguy1000
You must've changed something in your News Summary template named 'sample'.

Line 26 on mine is:

Code: Select all

{if $pagecount > 1}
I suggest you create a new news summary template, and mark it as default.

Re: Pages display unformatted menus only - php error recorde

Posted: Tue Jan 04, 2011 7:39 pm
by PaulMacFarlane
Guys - really appreciate the help.

I have not modified anything. Didn't even change the template for the page to use.
Changed it to simple format and the page now displays.

Changed to the "ocean theme" and there is a message accross the top that says:
string(121) "Smarty error: [in tpl_head:27 line 6]: syntax error: unrecognized tag 'JQueryTools' (Smarty_Compiler.class.php, line 590)"

Tried another them on the home page and there are a lot of this errro:
string(71) "Smarty error: unable to read resource: "globalcontent:adsense vertical""

I'm sort of thinking my setup is still not quite right.....

Re: Pages display unformatted menus only - php error recorde

Posted: Wed Jan 05, 2011 12:07 am
by PaulMacFarlane
calguy1000 wrote:You must've changed something in your News Summary template named 'sample'.

Line 26 on mine is:

Code: Select all

{if $pagecount > 1}
I suggest you create a new news summary template, and mark it as default.
I looked at that template and mine says the same thing.......

So, I'm thinking it's not the tenmplates, etc, it the way it being processed.....

Re: Pages display unformatted menus only - php error recorde

Posted: Wed Jan 05, 2011 12:18 am
by ajprogramming
It is line 26 of the smarty complied template. Please post line 26 of that file (it is given in the error message), and we may be able to help more.

Re: Pages display unformatted menus only - php error recorde

Posted: Wed Jan 05, 2011 12:56 am
by PaulMacFarlane
Okay - I think it's MySql.

The schema is created and the tables are created but when I do something simple like add a news catagory, it says "Added Successfully" but it's not there.

Re: Pages display unformatted menus only - php error recorde

Posted: Wed Jan 05, 2011 7:43 pm
by mbrubaker
We are experiencing the same problem with a clean install of 1.9.2. I tried the same thing you did with creating a news category, and CMSMS gave the message that the category was successfully created. No category appeared in the news module, however. I looked at the table structure via PHPMyAdmin and noticed that it appears that there are missing tables. In an older production CMSMS site I see that there are 6 cms_module_news tables. (_news, _news_categories, _news_categories_seq, _news_fielddefs, _news_fieldvals, and _news_seq). In my new installation, there are only 2 cms_module_news_ tables. (_news_categories_seq, and _news_seq) It seems as though the install failed to create all of the necessary tables.

CMSMS 1.9.2
Windows Server 2003
IIS6
PHP 5.3.4
MySQL 5.5.8

Re: Pages display unformatted menus only - php error recorde

Posted: Wed Jan 05, 2011 10:58 pm
by PaulMacFarlane
Thanks for letting me know I'm not crazy ! ;D

have you come up with a solution? I am thinking about going back to the older versions another site (I have running) is using.

I do not know if it's a MySQL problem or something else....

Re: Pages display unformatted menus only - php error recorde

Posted: Thu Jan 06, 2011 12:49 am
by PaulMacFarlane
I uninstalled MySQL 5.5.5 and went back to a know version 5.0x.

Re-ran the install script (did not change any CMS stuff) and it runs perfectly.

When admining 5.5.5 I notice a lot of quirks....