I was previously running v1.5, and have successfully upgraded to v1.9.4.
With the upgrade to v1.10, i ran into the problem of not seeing any content on my page -- but it is there on the backend.
The error is see pinpoints a User Defined Tag i am running that i called {sectiontitle} which is supposed to pull the parent section name. I use it in my div id and to call a URL path to serve a certain image.
Here is the actual error code:
Code: Select all
Fatal error: Call to a member function Execute() on a non-object in /homepages/42/d274302523/htdocs/lib/classes/class.usertagoperations.inc.php(260) : eval()'d code on line 28
Code: Select all
global $gCms;
$levels = isset($params["levels"]) ? $params["levels"] : 1 ;
// which page are we viewing?
$curPageID = $gCms->variables['content_id'];
$curPage = ContentManager::LoadContentFromId($curPageID);
// figure out the details of the current page and where it fits in
// the content hierarchy
$curHierarchy = $curPage->Hierarchy().'.';
$theLevels = explode (".",$curHierarchy);
$imSpec = $sectiontitle;
$depth = substr_count($curHierarchy,'.');
if ($levels < $depth)
{
$depth = $levels;
}
$hierCode = "";
for ($j=0;$j<$depth;$j++)
{
$hierCode .= substr("00000",0,5-strlen($theLevels[$j])) . $theLevels[$j] . ".";
}
$hierCode = rtrim($hierCode,".");
$db = $gCms->db;
$query = "select content_alias, content_name from " . cms_db_prefix().
"content where hierarchy=?";
$dbresult = $db->Execute($query, array($hierCode));
if ($dbresult && $dbresult->RecordCount() > 0)
{
$row = $dbresult->FetchRow();
$imSpec = strtolower($row["content_alias"]). "";
$imText = $row["content_name"];
}
echo "${imSpec}";
I have a feeling the Database schema must have changed causing my custom code not to work. I did not write the code myself, so i can't figure out what to change! I am hoping an expert can help me!
Thanks in advance.