There is a bug with MySQL 5.5.x where, as I understand it, MySQL header files are being placed in locations where they are not being found by PHP. See http://bugs.mysql.com/bug.php?id=58987
I uninstalled MySQL 5.5.8 and installed 5.1.54, then reinstalled CMSMS 1.9.2. Everything seems to work fine now.
Pages display unformatted menus only - php error recorded - new install
Re: Pages display unformatted menus only - php error recorde
Perfect. thank you very much !everything works just fine.
Re: Pages display unformatted menus only - php error recorde
awebtech,awebtech wrote:I have got absolutely the same problem (as in the initial post) with my brand new installation:
Fatal error: Cannot use object of type stdClass as array in C:\server\htdocs\ndk\tmp\templates_c\News^%%18^186^1863A414%%module_db_tpl%3ANews%3BsummaryDefault.php on line 26
Actually the problem is located in the default news summary template. There are incorrect references to the object's properties within this template.
The variable $node is the stdClass object and it is necessary to use '->' syntax (instead of dots) to access its properties. Dots are used to get array elements by keys.
I am an absolute new comer to CMS Made Simple and have run into the same error you described.
Actually, I installed Version 1.9.2 on my Windows 7 machine (with the latest WAMPServer2.1d-x64), and everything works fine.
(There are warnings for the date functions on the 'Tags in core' page, but the Fatal error does not occur.)
However, I when I install V 1.9.2 on my XP machines ( with the latest WAMPServer2.1e-x32), I do get the fatal error.
I have experimented with the code changing $node. to $node-> in several files but with no success.
Would you please tell me in exactly which files you made these changes?
Thanks.
RHF
EDIT: Hmm. I followed the suggestion of mbrubaker & PaulMacFarlane below and installed MySQL5.1.54 x32 on my XP machines, and everything works as expected.
Go figure.
Re: Pages display unformatted menus only - php error recorde
For absolute newcomers -
Go to [Content] [News] [Summary Templates] then select the sample template
Replace the entire contents with this ...
<!-- Start News Display Template -->
{* This section shows a clickable list of your News categories. *}
<ul class="list1">
{foreach from=$cats item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
<li{if $node->index == 0} class="firstnewscat"{/if}>
{if $node->count > 0}
<a href="{$node->url}">{$node->news_category_name}</a>{else}<span>{$node->news_category_name} </span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{* this displays the category name if you're browsing by category *}
{if $category_name}
<h1>{$category_name}</h1>
{/if}
{* if you don't want category browsing on your summary page, remove this line and everything above it *}
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">
{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate|cms_date_format}
</div>
{/if}
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
Go to [Content] [News] [Summary Templates] then select the sample template
Replace the entire contents with this ...
<!-- Start News Display Template -->
{* This section shows a clickable list of your News categories. *}
<ul class="list1">
{foreach from=$cats item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
<li{if $node->index == 0} class="firstnewscat"{/if}>
{if $node->count > 0}
<a href="{$node->url}">{$node->news_category_name}</a>{else}<span>{$node->news_category_name} </span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{* this displays the category name if you're browsing by category *}
{if $category_name}
<h1>{$category_name}</h1>
{/if}
{* if you don't want category browsing on your summary page, remove this line and everything above it *}
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage} {$prevpage}
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
{$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">
{if $entry->postdate}
<div class="NewsSummaryPostdate">
{$entry->postdate|cms_date_format}
</div>
{/if}
<div class="NewsSummaryLink">
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
<div class="NewsSummaryCategory">
{$category_label} {$entry->category}
</div>
{if $entry->author}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->author}
</div>
{/if}
{if $entry->summary}
<div class="NewsSummarySummary">
{eval var=$entry->summary}
</div>
<div class="NewsSummaryMorelink">
[{$entry->morelink}]
</div>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
{if isset($entry->extra)}
<div class="NewsSummaryExtra">
{eval var=$entry->extra}
{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div>
{/if}
{if isset($entry->fields)}
{foreach from=$entry->fields item='field'}
<div class="NewsSummaryField">
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}: {eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
Re: Pages display unformatted menus only - php error recorde
I have same problem with mySQL 5.5.8 --> your solution works, and there is no error with news, but...But templates don't work - unformatted text, no css. Any idea what to do with this?
Re: Pages display unformatted menus only - php error recorde
Hi,
Cmsms1.9.3 does not works on MYSQL 5.5.8
There are some problem on the installation of tables from News ans Search
Cmsms1.9.3 does not works on MYSQL 5.5.8
There are some problem on the installation of tables from News ans Search