CMS MADE SIMPLE FORGE

SEOTools2

 

[#8232] {SeoTools2} Tag is not running / Fatal error

avatar
Created By: M4rc3L-XCN (M4rc3L-XCN)
Date Submitted: Fri Aug 10 05:37:50 -0400 2012

Assigned To: Prue Rowland (psy)
Version: 1.0.10
CMSMS Version: None
Severity: Critical
Resolution: Fixed
State: Closed
Summary:
{SeoTools2} Tag is not running / Fatal error
Detailed Description:
I have installed SeoTools2 on CMSms Version 1.11 and i include the {SeoTools2}
Tag to the site template. And it request this Error:

Array ( [app_name] => CMS [sitename] => ----- [smarty] => [pagetitle] => 404
Error [actionid] => m7cce5
[actionparams] => Array ( [module] => SEOTools2 [action] => default )
[returnid] => [actionmodule] => SEOTools2 
[SCRIPT_NAME] => /admin/edittemplate.php) 

Fatal error: Call to a member function GetURL() on a non-object in
/html/modules/SEOTools2/action.default.php on line 74


The Problem is: 
$tpl_vars = $smarty->get_template_vars();
$curcontent = $tpl_vars['content_obj'];

it gives no content_obj.



History

Comments
avatar
Date: 2012-08-10 05:43
Posted By: Prue Rowland (psy)

Thank you for the detailed message.  I'll get onto it!

      
avatar
Date: 2012-08-10 08:48
Posted By: Leeroy Brun (leeroybrun)

I had the same problem, here what I've done to solve it :

------------------------------------------------------------------------------------------
Open the file modules/SEOTools2/action.default.php
------------------------------------------------------------------------------------------
After :
$tpl_vars = $smarty->get_template_vars();
$curcontent = $tpl_vars['content_obj'];

Add :
if($curcontent != NULL) {
------------------------------------------------------------------------------------------
After :
	// Image-Link

//if (($curcontent->GetPropertyValue('image') != -1) &&
($curcontent->GetPropertyValue('image') != ""))  {
	//    if (($img != -1) && ($img != ""))  {
//      echo "<link rel='image_src'
href='".$root_url."/uploads/images/".$img."' />";
	//    }

Add :
}
------------------------------------------------------------------------------------------
Replace :
$img = $curcontent->Properties()->GetValue('image');

With :
$img = $curcontent->GetPropertyValue('image');
------------------------------------------------------------------------------------------

Hope this help ! :-)

Regards
      
avatar
Date: 2012-09-09 19:37
Posted By: Prue Rowland (psy)

Fixed in SEOTools2 v1.1
      
Updates

Updated: 2013-07-27 19:28
cmsms_version_id: 29719 => -1
state: Open => Closed

Updated: 2012-09-09 19:37
resolution_id: 5 => 7

Updated: 2012-08-10 05:38
resolution_id: => 5
assigned_to_id: 100 => 803