Why do I see this smarty error (cgsimple)...

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
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

Why do I see this smarty error (cgsimple)...

Post by sarah_h »

I'm just trying the simplest of things; to get the page title

{$cgsimple->get_page_title()}

But this is what I see.

string(146) "Smarty error: [in content:content_en line 5]: syntax error: unrecognized tag: $cgsimple->get_page_title() (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 5]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"

I've tried loads of example found here on the forum but I always see this error.

Any ideas?

Sarah
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Why do I see this smarty error (cgsimple)...

Post by kermit »

sarah_h wrote: {$cgsimple->get_page_title()}

unrecognized tag: $cgsimple->get_page_title()
do you have http://dev.cmsmadesimple.org/projects/cgsimplesmarty/ module installed?
sarah_h wrote: [in content:content_en line 5]
in a page's content block, you can simply use the built-in {title} tag to display the current page's title.. e.g: {title}
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
sarah_h
Forum Members
Forum Members
Posts: 189
Joined: Tue Apr 25, 2006 8:30 am

Re: Why do I see this smarty error (cgsimple)...

Post by sarah_h »

Thanks Kermit. I feel such a fool!  :-[
dumpf
New Member
New Member
Posts: 4
Joined: Fri Aug 01, 2008 7:45 am

Re: Why do I see this smarty error (cgsimple)...

Post by dumpf »

Hi there,

Actually I've got the same problem with CGSimpleSmarty.

I tried it with the latest and some older versions, always getting the same error:

Code: Select all

string(142) "Smarty error: [in content:parent line 1]: syntax error: unrecognized tag: $cgsimple->get_page_title() (Smarty_Compiler.class.php, line 446)" string(113) "Smarty error: [in content:parent line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" 
Funny thing with that: if I reload the page, the error disappears but nothing else does appear. Neither an error message nor anything at all.

This happens with all "$cgsimple->"-tags (I need to include content from non-active pages to the active one) I tried.
{cgrepeat} and {module_something} are working!

I'd appreciate some help :)

Thanks in advance

Max

PS: I use CMSMS v1.2.4, cgsimple v1.3 (and tried older ones as well)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Why do I see this smarty error (cgsimple)...

Post by Dr.CSS »

You should upgrade ASAP from 1.2.4...
dumpf
New Member
New Member
Posts: 4
Joined: Fri Aug 01, 2008 7:45 am

Re: Why do I see this smarty error (cgsimple)...

Post by dumpf »

Ok I'll do that. But will it solve my problem?

I'll just try and post the answer myself :)

Edit:
I just updated to v1.3.1

Fortunately, nothing got lost while upgrading.

Unfortunately, the error still exists. I even encountered a new problem:
Sometimes(!) when (re)loading a page, this smarty error occurs:

Code: Select all

string(326) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag: mso-style-parent:""; 
margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; mso-bidi-font-size:10.0pt; 
font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; (Smarty_Compiler.class.php, line 446)" 
string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 
590)" string(377) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag: mso-style-next:Standard; 
margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; page-break-after:avoid; mso-outline-level:1; 
font-size:12.0pt; mso-bidi-font-size:10.0pt; font-family:"Times New Roman"; mso-font-kerning:0pt; font-weight:normal; 
(Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized 
tag '' (Smarty_Compiler.class.php, line 590)" string(328) "Smarty error: [in content:content_en line 1]: syntax error: 
unrecognized tag: mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; 
mso-pagination:widow-orphan; mso-outline-level:3; font-size:13.5pt; font-family:"Times New Roman"; font-weight:bold; 
(Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized 
tag '' (Smarty_Compiler.class.php, line 590)" string(331) "Smarty error: [in content:content_en line 1]: syntax error: 
unrecognized tag: mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; 
mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; 
(Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized 
tag '' (Smarty_Compiler.class.php, line 590)" string(355) "Smarty error: [in content:content_en line 1]: syntax error: 
unrecognized tag: mso-style-name:byline; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-
left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New 
Roman"; (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 1]: syntax error: 
unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(251) "Smarty error: [in content:content_en line 1]: syntax 
error: unrecognized tag: size:612.0pt 792.0pt; margin:70.85pt 70.85pt 2.0cm 70.85pt; mso-header-margin:36.0pt; 
mso-footer-margin:36.0pt; mso-paper-source:0; (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in 
content:content_en line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(130) "Smarty error: 
[in content:content_en line 1]: syntax error: unrecognized tag: page:Section1; (Smarty_Compiler.class.php, line 446)" 
string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 
590)" string(505) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag: mso-style-name:"Normale 
Tabelle"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-
alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; 
font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-
language:#0400; (Smarty_Compiler.class.php, line 446)" string(117) "Smarty error: [in content:content_en line 1]: syntax 
error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" 

As you can see it's part of a css-style. But why does it appear spontaneausly? As i can see, there is no regularity...

I'd really appreciate some help because the homepage has to go online soon :(

Thanks a lot!


Edit No2:

I also tried using a different template. I assumed I forgot a "}" anywhere. I was wrong :(
Last edited by dumpf on Sun Aug 03, 2008 12:56 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Why do I see this smarty error (cgsimple)...

Post by Dr.CSS »

Nope, your problem is that you are pasting out of M$ word and all those crazy things are msword specific formatting...

mso-style-parent:"";
margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; mso-bidi-font-size:10.0pt;
font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";

If you look at the source, turn off the wysiwyg editor when editing a page you will see all kinds of excess formatting...
dumpf
New Member
New Member
Posts: 4
Joined: Fri Aug 01, 2008 7:45 am

Re: Why do I see this smarty error (cgsimple)...

Post by dumpf »

aah I see.

So I outed my as a newbee :)


Strange though, that it happens sometimes and after a reload it's gone.


But that still doesn't solve my problem with cgsimple.

Could it relate to a problem with the php-configuration? e.g. Safemode?
dumpf
New Member
New Member
Posts: 4
Joined: Fri Aug 01, 2008 7:45 am

Re: Why do I see this smarty error (cgsimple)...

Post by dumpf »

Solved.

And I prooved to be a huge idiot.

Those who are able to read, got a damn huge advantage:
When this module is installed, a new smarty object named cgsimple is automatically available to your page templates, global content blocks, and various module templates.
And NOT (as I thought) on content itself!

That solved the whole problem. Damn I'm such a newbee. Everone should scream: "RTFM" :)

Thanks a lot for everyone's help!

Max
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Why do I see this smarty error (cgsimple)...

Post by kermit »

@dumpf

just tested {$cgsimple->get_page_title()} and {$cgsimple->get_page_content(pagealias)}in a page's content; where 'pagealias' was a different page and was marked 'inactive' (also checked with it being 'active')

the first output the same as {title} as expected; the second one output the content of the designated page (although that content was not run through smarty (?) .. tags in that content were not interpreted, such as "{title}" and a menumanager tag.

this was done in cmsms 1.3.1 with cgsimplesmarty 1.3
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Post Reply

Return to “CMSMS Core”