Page 1 of 1

Upgrade to 1.9.4.2 - parsing error - unable to edit pages

Posted: Sun Jul 24, 2011 7:32 pm
by ilene
I just upgraded to 1.9.4.2 from 1.6.7.

When I go to edit pages I get the following error on the top:
"An error occurred parsing content blocks (perhaps duplicated block names)"

I understand somewhat from looking at previous posts that I'm not using the word "content" properly or too often in the template. You can see my template below.

Please suggest how I can eliminate this error. I am not a programmer, so the simpler the explanation, the more helpful it would be.

Thanks!

Code: Select all

{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<link rel="shortcut icon" href="uploads/images/favicon.ico">
<title>{sitename} - {title}</title>
{metadata}
{stylesheet}
{literal}<__script__ type="text/javascript" src="uploads/dynamic-font-resize.js"></__script>{/literal}


<!--[if IE]>
{literal}<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>{/literal}
<![endif]-->
{* The above JavaScript is required for CSSMenu to work in IE *}
</head>
</__body>

<div id="container">
<!-- start header -->
{global_content name='header'}
<!-- end header -->



<!-- start content -->
<div id="contentyellow"><div id="contentint">
<h4>{content block="title"}</h4>
<div id="your-body">{content}</div>

</div>
</div>

<div id="leftpanel">
{content block="leftpanel"}

<div id="sidenav">

<!-- If not logged in, don't show the board-only navigation (exclude from visibility); otherwise show it (if logged in)-->
{if $ccuser->loggedin()}
  {menu template='leftnavigation' start_level='2' collapse='1' excludeprefix="2009-campaign-for-kids-supporters"}
{else}
 {menu template='leftnavigation' start_level='2' collapse='1' excludeprefix='2009-campaign-for-kids-supporters,board-only'}
{/if}



<!--{menu template='leftnavigation' start_level='2' collapse='1' excludeprefix="2009-campaign-for-kids-supporters"}--></div></div>

 <div id="sidebar">
  <div id="your-body">{content block="sidebar"}</div>
 </div>
<!-- end content -->
<!-- start footer/bottom -->
 <div id="bottom">{global_content name='bottom'}
</div>
<!-- end footer/bottom -->
{global_content name='ddnav'}</div>
{global_content name='google_analytics'}
<__body>
</__html>

Re: Upgrade to 1.9.4.2 - parsing error - unable to edit page

Posted: Sun Jul 24, 2011 7:42 pm
by calguy1000
Generic instructions:

if you have {content} multiple times in your template.

a: put {content assign='my_content_var'} directly after the </__body> statement.
b: replace all occurrences of {content} with {$my_content_var}

if you have {content block='foo'} multiple times in your template
a: put {content block='foo' assign='my_foo_var'} directly after the </__body> statement
b: replace all occurrences of {content block='foo'} with {$my_foo_var}

Re: Upgrade to 1.9.4.2 - parsing error - unable to edit page

Posted: Sun Jul 24, 2011 8:09 pm
by RonnyK
I think the issue in this case is the missing {content} block, which is checked against now. At least {content} is required, where the extra ones are optional.

Ronny

Re: Upgrade to 1.9.4.2 - parsing error - unable to edit page

Posted: Sun Jul 24, 2011 8:36 pm
by Jos
{content} is there
<!-- start content -->
<div id="contentyellow"><div id="contentint">
<h4>{content block="title"}</h4>
<div id="your-body">{content}</div>
And I also don't see any duplicate content blocks :-\

Re: Upgrade to 1.9.4.2 - parsing error - unable to edit page

Posted: Sun Jul 24, 2011 9:00 pm
by ilene
Sorry, I'm still not understanding how to correct the parse error.

I have the following instances of {content:

Code: Select all

<h4>{content block="title"}</h4>    

Code: Select all

<div id="your-body">{content}</div>

Code: Select all

{content block="leftpanel"}

Code: Select all

{content block="sidebar"}

but I'm not seeing instances of duplicate uses of content blocks. Can you take a look at the complete template code I posted in my original post and see if your replies are still applicable?

Thanks,
Ilene

Re: Upgrade to 1.9.4.2 - parsing error - unable to edit page

Posted: Sun Jul 24, 2011 10:00 pm
by Jos
Just a wild guess: Maybe it is not allowed to use the name "title" for a content block, because there is already a field called title.

You could try to change

Code: Select all

{content block="title"}
into

Code: Select all

{content block="title2" label="title"}

[SOLVED]: Upgrade to 1.9.4.2-parsing error- unable to edit p

Posted: Wed Jul 27, 2011 7:48 pm
by ilene
Hey Jos,

Your "wild guess" turned out to be the culprit here.

Once I changed the code from:

Code: Select all

<h4>{content block="title"}</h4>
to:

Code: Select all

<h4>{title}</h4>
everything worked properly and pages were editable.

Thanks so much for your assistance!