[solved] User defined tag cause issues after upgrade
Posted: Mon Aug 19, 2013 4:37 pm
Hi there
I have just carried out a lengthy upgrade process from 1.9.2 to 1.11.7 and gone through clearing up all the issues. The main one was {stylesheet} to {cms_stylesheet}!
However, I have an issue with a UDT I have set up called child_content_overview that displays the name and start of the content for all child pages of the current page, in a list.
When I try to edit a template that has this UDT in, it causes errors when saving. It looks like exactly the same issue as the stylesheet issue but if I correct the stylesheet reference and remove the {child_content_overview} then the template saves fine.
The UDT itself seems to be working fine and I can edit that no problem so can anyone see a reason why the UDT reference would mean the template wouldn't save?
In case it helps, the UDT code is:
One of the templates it's used in is:
I'm tearing my hair out because I've been looking through the documentation and I can't see anything wrong.
If anyone can help I would really appreciate it!
I have just carried out a lengthy upgrade process from 1.9.2 to 1.11.7 and gone through clearing up all the issues. The main one was {stylesheet} to {cms_stylesheet}!
However, I have an issue with a UDT I have set up called child_content_overview that displays the name and start of the content for all child pages of the current page, in a list.
When I try to edit a template that has this UDT in, it causes errors when saving. It looks like exactly the same issue as the stylesheet issue but if I correct the stylesheet reference and remove the {child_content_overview} then the template saves fine.
The UDT itself seems to be working fine and I can edit that no problem so can anyone see a reason why the UDT reference would mean the template wouldn't save?
In case it helps, the UDT code is:
Code: Select all
global $gCms;
$manager =& $gCms->GetHierarchyManager();
$thisPage = $gCms->variables['page_name'];
$currentNode = &$manager->sureGetNodeByAlias($thisPage);
$nodes = $currentNode->getChildren();
if ($currentNode->hasChildren()) {
foreach ($nodes as $node) {
$content= $node->getContent();
if ($content->Active()){
$page_alias = $content->Alias();
$cgsimple = $smarty->get_template_vars('cgsimple');
$Sum = $cgsimple->get_page_content($page_alias, 'extra1');
$url = $content->GetURL();
if ($url == "#") { /* section header has no link by default */
$url = "index.php?page=".$content->Alias();
}
echo "<h3><a href=\"".$url."\" title=\"".$content->TitleAttribute()."\">".$content->MenuText()."</a></h3>\n";
echo "<p>".$Sum." <a href=\"".$url."\" title=\"".$content->TitleAttribute()."\">[read more...]</a></p>\n";
}
}
}
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" lang="en" xml:lang="en">
<head>
<title>{sitename} - {title}</title>
{metadata}
{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}
{cms_stylesheet}
<!--[if IE]>
{cms_stylesheet name="CCC IE Fix"}
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
{* The above JavaScript is required for CSSMenu to work in IE *}
</head>
</__body>
<div id="pageholder">
<div id="header">
<h1><a href="/" title="Return to home page"><span></span>{sitename}</a></h1>
<div id="phonenumber"><span></span>For appointments or enquiries call 01285 658796</div>
</div>
{menu template='CCC Top Menu'}
<div id="content">
<div id="sidenavcol" class="columnleft">
<h4><span></span>In this section</h4>
{menu template="CCC Side Menu" start_element=$friendly_position|truncate:1:""}
</div>
<div id="pagecopy" class="columnleft">
<h2>{title}</h2>
{content}
{child_content_overview}
</div>
<div id="fourboxcol" class="columnleft zeromargins">
{global_content name="FourBoxOut"}
</div>
<hr />
</div>
<div id="footer">
{global_content name="Footer"}
</div>
</div>
<__body>
</__html>
If anyone can help I would really appreciate it!