CMS MADE SIMPLE FORGE

Autometa

 

[#7405] Tag stops the site from working in version 1.10.x

avatar
Created By: Rob den Toom (rodeto)
Date Submitted: Fri Dec 30 11:41:07 -0500 2011

Assigned To: Sofia Hauschildt (sonya)
Version: Autometa 1.2
CMSMS Version: 1.10.2
Severity: Critical
Resolution: None
State: Open
Summary:
Tag stops the site from working in version 1.10.x
Detailed Description:
Since an upgrade to version 1.10.x the tag is the reason that the site does not
load anymore.
The error that is shown in the admin log is: ” ERROR DETECTED: Call to a member
function SelectLimit() on a non-object at
/home/lacura/domains/XXXX.nl/public_html/plugins/function.autometa.php:92”.


History

Comments
avatar
Date: 2012-06-30 10:18
Posted By: mktskk (mktskk)

I made two changes to the code.

I removed reference in line 58,
before:
$node =& $manager->getNodeById($gCms->variables['content_id']);
after:
$node = $manager->getNodeById($gCms->variables['content_id']);

and I changed code in line 80,
before:
$db = $gCms->db;
after:
$db = $gCms->GetDb();

and voila, it's working :)

Thank you calguy1000 for explanation of the changes in the API -
http://forum.cmsmadesimple.org/viewtopic.php?p=264304#p264304 in section "What
We Broke (Technical Stuff)"


      
avatar
Date: 2012-06-30 11:08
Posted By: mktskk (mktskk)

Ooops. I forgot to add that I had previously done some other changes.
The most important is:

in line 21,
before:
global $gCms;
after:
$gCms = cmsms();

and some others:
in line 102,

before:
printf ('<meta name="keywords" content="'.implode(', ',$wordlist).'" />'."\n");
after:
echo ('<meta name="keywords" content="'.implode(', ',$wordlist).'" />'."\n");

and for my needs (may be useful to someone)
in line 113,

before:
$break = '.';
after:
$break = ' ';

in line 121,

before:
printf ('<meta name="description" content="'.$adddesc.' '.trim($desc).'"
/>'."\n");
after:
echo ('<meta name="description" content="'.$adddesc.' '.trim($desc).'"
/>'."\n");
} else {
echo ('<meta name="description" content="'.$adddesc.'" />'."\n");

That's all.