Tuesday, 29 July 2014 14:58
beggarly

Bug with SOBIPRO plugin

Report Xmap bugs on this forum.

Bug with SOBIPRO plugin

Postby adroussel » Mon Aug 08, 2011 11:08 pm

Hello
I'm a xmap user since a long time and I have to say it's a great extension. Thanks!

I just installed the v2 on a Joomla 1.7 and it's working fine.
My site is running sobipro component and when I enable your SOBIPRO plugin for xmap I get a fatal error on the html site map page:

Fatal error: Class 'SPC' not found in C:\wamp\www\mydomain.com\components\com_sobipro\lib\base\fs\loader.php on line 104

Thanks for your help
adroussel
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Mon Aug 08, 2011 11:03 pm

Re: Bug with SOBIPRO plugin

Postby linpi » Thu Aug 25, 2011 10:12 am

I have the same problem with SobiPro 1.0RC5, Xmap 2 & Joomla 1.7.
the error is:
Fatal error: Class 'SPC' not found in /..../components/com_sobipro/lib/base/fs/loader.php on line 104

it seems that a file can not be read...

Probably a lot has changed between SobiPro 1.0RC4 and SobiPro 1.0RC5.
linpi
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Sun Oct 17, 2010 8:28 pm

Re: Bug with SOBIPRO plugin

Postby adroussel » Thu Aug 25, 2011 10:29 am

Hi
I got the error with Sobipro RC3 and RC4
adroussel
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Mon Aug 08, 2011 11:03 pm

Re: Bug with SOBIPRO plugin

Postby linpi » Tue Oct 11, 2011 4:43 pm

yeah! xmap with a working sobipro plugin!
I debugged the code until I found the solution.

Actually there were only 2 lines to add in file /plugins/xmap/com_sobipro/com_sobipro.php :
static protected function loadSobi()
{
if (defined('SOBI_TESTS')) {
return true;
}
define( 'SOBI_TESTS', false );
$ver = new JVersion();
$ver = str_replace( '.', null, $ver->RELEASE );

// here 1. change. there is no cms version 1.7 in sobipro. either 1.5 or 1.6
if ($ver > '15') { $ver = '16'; }

define( 'SOBI_CMS', 'joomla'. $ver );
define( 'SOBIPRO', true );
define( 'SOBI_TASK', 'task' );
define( 'SOBI_DEFLANG', JFactory::getLanguage()->getDefault() );
define( 'SOBI_ACL', 'front' );
define( 'SOBI_ROOT', JPATH_ROOT );
define( 'SOBI_MEDIA', implode( DS, array( JPATH_ROOT, 'media', 'sobipro' ) ) );
define( 'SOBI_MEDIA_LIVE', JURI::root().'/media/sobipro' );
define( 'SOBI_PATH', SOBI_ROOT.DS.'components'.DS.'com_sobipro' );
if (!file_exists(SOBI_PATH.DS.'lib'.DS.'base'.DS.'fs'.DS.'loader.php')) {
return false;
}
require_once SOBI_PATH.DS.'lib'.DS.'base'.DS.'fs'.DS.'loader.php';
SPLoader::loadClass( 'sobi' );
SPLoader::loadClass( 'base.request' );
SPLoader::loadClass( 'base.object' );
SPLoader::loadClass( 'base.factory' );
SPLoader::loadClass( 'base.mainframe' );

// here 2. change. some constants have to be loaded as well like SPC::NO_VALUE
SPLoader::loadClass( 'base.const' );

SPLoader::loadClass( 'cms.base.mainframe' );
SPLoader::loadClass( 'cms.base.lang' );
return true;
}


I works fine for me, please don't ask me if it doesn't work for you... maybe tell me if it works for you as well.
I tested it on a Joomla! Version 1.7.1, xmap 2.0

in attachment the xmap sobipro plugin to replace/upgrade.
Enjoy! :D
Attachments
plg_com_sobipro-corr.zip
the corrected plugin
(7.18 KiB) Downloaded 392 times
linpi
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Sun Oct 17, 2010 8:28 pm

Re: Bug with SOBIPRO plugin

Postby guilleva » Fri Oct 14, 2011 11:13 pm

Hi,

Thanks for sharing it, I have updated the code with your fix!

Guillermo
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica

Re: Bug with SOBIPRO plugin

Postby jorgepelaez » Wed Oct 19, 2011 2:11 pm

Is this plugin compatible with Joomla 1.5.24?
jorgepelaez
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Tue Oct 18, 2011 9:42 pm

Re: Bug with SOBIPRO plugin

Postby linpi » Wed Oct 19, 2011 2:48 pm

I haven't tried SobiPro & Xmap 2 on Joomla! 1.5, but actually it should, because SobiPro is compatible with J! 1.5 but I don't know if Xmap 2 is working J!1.5.
just try....
linpi
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Sun Oct 17, 2010 8:28 pm

Re: Bug with SOBIPRO plugin

Postby jorgepelaez » Fri Oct 21, 2011 2:23 pm

Isn't v. 2 Joomla 1.6 & 1.7 only?
jorgepelaez
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Tue Oct 18, 2011 9:42 pm

Re: Bug with SOBIPRO plugin

Postby guilleva » Sat Nov 26, 2011 1:43 am

Yes, this plugin is only compatible with Xmap 2.0 for Joomla 1.6 and 1.7. I'm sorry about that! I will try to add it for Xmap 1 as well in a future release!
User avatar
guilleva
Administrator
Administrator
 
Posts: 1527
Joined: Wed Sep 12, 2007 3:10 am
Location: San José, Costa Rica


Return to Bugs



Who is online

Users browsing this forum: Exabot [Bot] and 4 guests