Upgrade to 1.9.4.2 - parsing error - unable to edit pages

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
ilene
Forum Members
Forum Members
Posts: 32
Joined: Tue Dec 16, 2008 10:13 pm

Upgrade to 1.9.4.2 - parsing error - unable to edit pages

Post 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>
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

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

Post 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
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

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

Post 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 :-\
ilene
Forum Members
Forum Members
Posts: 32
Joined: Tue Dec 16, 2008 10:13 pm

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

Post 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
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

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

Post 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"}
ilene
Forum Members
Forum Members
Posts: 32
Joined: Tue Dec 16, 2008 10:13 pm

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

Post 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!
Locked

Return to “[locked] Installation, Setup and Upgrade”