[SOLVED] Smarty error when page is loaded for the first time

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.
Post Reply
neto
Forum Members
Forum Members
Posts: 17
Joined: Thu Mar 19, 2009 6:10 pm

[SOLVED] Smarty error when page is loaded for the first time

Post by neto »

I get this error when I access the page for the first time. If I reload the page the error desapears.
I triyed with cache on and off but the error persists.
Any hints of ehat I may try?
Using 1.10.3
string(163) "Smarty error: [in module_db_tpl:News;summarycompacta line 5]: syntax error: unrecognized tag: $entry>title|cms_escape:htmlall (Smarty_Compiler.class.php, line 446)" string(133) "Smarty error: [in module_db_tpl:News;summarycompacta line 5]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(125) "Smarty error: [in module_db_tpl:News;summarycompacta line 10]: [plugin] unknown tag - '/ul' (core.load_plugins.php, line 198)" string(137) "Smarty error: [in module_db_tpl:News;summarycompacta line 10]: syntax error: unrecognized tag '/ul' (Smarty_Compiler.class.php, line 590)"
Last edited by neto on Wed Jan 25, 2012 10:22 pm, edited 1 time in total.
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: Smarty error when the page is loaded for the first time

Post by CapereSpiritum »

Hi Neto, Sorry I can't help directly. I've been getting the same problem and have posted very similar to your post. I'm using 1.10.2 and I see that you're on 1.10.3.

It only occurs when a new page is loaded or later altered.

An F5 refresh clears it and it ONLY reappears if the page is subsequently modified.

Anybody else seen this and can you assist?

Cheers
uniqu3

Re: Smarty error when the page is loaded for the first time

Post by uniqu3 »

look in your News summary tmeplate called "compacta" there is some typo either missing " or ' or similar.
neto
Forum Members
Forum Members
Posts: 17
Joined: Thu Mar 19, 2009 6:10 pm

Re: Smarty error when the page is loaded for the first time

Post by neto »

Hi to all,

I made some changes on my compacta template and it works ok now

1)removed all entryes that had htmlall
2) for some lack of attention I had closed my unordered list with {/ul} insted of </ul>

these two changes apear to have fixed the problem.
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: [SOLVED] Smarty error when page is loaded for the first

Post by CapereSpiritum »

Hi Neto & uniqu3

I have searched thru my News Summary Template/s.

I cannot find anything called compacta or any UL tags as I've already removed them a while ago as I did not want 'category browsing'.

The error messages are still occurring.
Would one of you be so kind as to direct me to the 'compacta' file.

My knowledge of php is slim whilst I'm fine with HTML and CSS.

Thanks for your help
neto
Forum Members
Forum Members
Posts: 17
Joined: Thu Mar 19, 2009 6:10 pm

Re: [SOLVED] Smarty error when page is loaded for the first

Post by neto »

compacta is the name of a a custom template i made for news sumary.

I mistyped some tags when I wrote it.

For what I can say the problem was caused by my mistyping on the template.

I was originally trying to change the page title based on the news, but I gave up for now.

Hope this info help ypu.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Smarty error when page is loaded for the first

Post by Dr.CSS »

@CapereSpiritum

If you are having a problem with a specific news template throwing errors it may help to paste the template her so we can see it...
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: [SOLVED] Smarty error when page is loaded for the first

Post by CapereSpiritum »

I don't think my problem is related to the news template as the 'error' also shows on pages recently edited that do NOT contain the news section

This is an error from a page which does NOT have the news...
string(148) "Smarty error: [in globalcontent:AWNWHeader line 4]: syntax error: unrecognized tag: cms_selflink%20href='Home' (Smarty_Compiler.class.php, line 446)" string(123) "Smarty error: [in globalcontent:AWNWHeader line 4]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

In the Globalcontentblock AWNWHeader, there is the following;
<a title="ArtWork NetWork Home Page" href="{cms_selflink%20href='Home'}">
Plus 1 image some basic text.

Here's the news template just in case
<!-- Start News Display Template -->
<h2>News</h2>
{if $pagecount > 1}
<p>
{if $pagenumber > 1}
{$firstpage}&nbsp;{$prevpage}&nbsp;
{/if}
{$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}
{if $pagenumber < $pagecount}
&nbsp;{$nextpage}&nbsp;{$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="News">
{if $entry->postdate}
<div>
{$entry->postdate|cms_date_format}
</div>
{/if}
<div>
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</div>
<div>
<span class="NewsCatAuth">{$category_label} {$entry->category}</span>
</div>
{if $entry->author}
<div class="NewsCatAuth">
<span class="NewsCatAuth"> </span>
</div>
{/if}
{if $entry->summary}
<div>
{eval var=$entry->summary}
</div>
<div>
[{$entry->morelink}]
</div>
{else if $entry->content}
<div>
{eval var=$entry->content}
</div>
{/if}
{if isset($entry->extra)}
<div>
{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>
{if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/>
{else}
{$field->name}:&nbsp;{eval var=$field->value}
{/if}
</div>
{/foreach}
{/if}
</div>
{/foreach}
<!-- End News Display Template -->
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: [SOLVED] Smarty error when page is loaded for the first

Post by CapereSpiritum »

Just as an update...

The error message seems to only occur when I have set a age active/inactive. Certainly this ALWAYS generates an error message.

Hope this helps.

Simon
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Smarty error when page is loaded for the first

Post by Dr.CSS »

This...

string(148) "Smarty error: [in globalcontent:AWNWHeader line 4]: syntax error: unrecognized tag: cms_selflink%20href='Home' (Smarty_Compiler.class.php, line 446)"

I would remove the %20 and just use {cms_selflink href='Home'}...

If you set the page to inactive the system won't find it which is most likely why you get an error...
CapereSpiritum
Forum Members
Forum Members
Posts: 223
Joined: Wed Dec 28, 2011 12:11 pm

Re: [SOLVED] Smarty error when page is loaded for the first

Post by CapereSpiritum »

Thanks Dr CSS

Don't know why the %20 was there. It's not in any other CMSMS Linker Links.

I've est a page inactive. Refreshed the page... NO ERROR.

Set Active again, refreshed and NO ERROR.

I think you've cracked it.

Much appreciated...
Post Reply

Return to “CMSMS Core”