Page 1 of 1

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

Posted: Wed Jan 25, 2012 11:14 am
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)"

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

Posted: Wed Jan 25, 2012 9:11 pm
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

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

Posted: Wed Jan 25, 2012 9:34 pm
by uniqu3
look in your News summary tmeplate called "compacta" there is some typo either missing " or ' or similar.

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

Posted: Wed Jan 25, 2012 10:19 pm
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.

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

Posted: Mon Feb 06, 2012 2:21 pm
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

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

Posted: Mon Feb 06, 2012 3:52 pm
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.

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

Posted: Mon Feb 06, 2012 6:22 pm
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...

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

Posted: Wed Feb 08, 2012 1:26 pm
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 -->

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

Posted: Wed Feb 08, 2012 8:47 pm
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

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

Posted: Wed Feb 08, 2012 9:57 pm
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...

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

Posted: Sat Feb 11, 2012 11:28 am
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...