Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 2 Hours, 38 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

jConnector not Compatible
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: jConnector not Compatible
#5828
jConnector not Compatible 2 Years, 2 Months ago  
I had this plugin, and love it.. but then once I added jConnector, it broke.. it's a simple fix, I'm sure, but I'm not sure whose end it would be on...

I have jConnector so I could implement Facebook authentication on my Joomla 1.5.15 site using Advanced Modules 1.3.1.. so when I try to authenticate, it won't work because I would get a Fatal Error.. I disabled Advanced Modules Plugin, and it worked fine, so I did some tracing and here's what I got after clicking the link (while Advanced Modules Plugin was enabled).

modules/mod_jconnector/jconnector_server.php reports:
Fatal error: Cannot redeclare class JModuleHelper in /home/ldonor/cafeworld/plugins/system/advancedmodules/modulehelper.php on line 47

I checked plugins/system/advancedmodules/modulehelper.php and saw that it was also using the JModuleHelper class.. so I looked for it in modules/mod_jconnector/jconnector_server.php code until JModuleHelper is called:
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );

include_once './extension_detector.php';
include_once './classes.php';

$_file_ = str_replace(constant('DS').'modules'.constant('DS').'mod_jconnector', '', dirname(__FILE__));
define('JPATH_BASE',  $_file_);

chdir('../../');
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
require_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'application'.DS.'module'.DS.'helper.php' );
include_once (JPATH_BASE .DS.'components'.DS.'com_user'.DS.'controller.php');
include_once (JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'base'.DS.'observable.php');

$config =& JFactory::getConfig();
$config->setValue('config.absolute_path', JPATH_BASE);

$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$db = & JFactory::getDBO();
$user = & JFactory::getUser();
JPluginHelper::importPlugin('system');

$module = JModuleHelper::getModule('jconnector', '');

I figured you'd probably know what to do.. I'm still learning J! Code. Plugin takes priority right? So then would there be a quick fix so that jConnector doesn't try to redeclare that class?

Thanks!
LaughDonor
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5841
jConnector not Compatible 2 Years, 2 Months ago  
It is due to bad programming on jconnector's side.
It is including scripts in a non-Joomla way.
Also it is including the module helper file, which is already available through Joomla (seeing this is a module!).
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5845
jConnector not Compatible 2 Years, 2 Months ago  
So how would you recommend fixing jConnector's code?... should I change that library include to include your modulehelper.php file instead?.. or does it depend on how it utilizes the $module variable or getModule function?
LaughDonor
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5847
jConnector not Compatible 2 Years, 2 Months ago  
Wow! I fixed it!... I'm posting the solution to those forums. But here's what I did: I reformatted their includes like so:
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
$parts = explode( DS, dirname(__FILE__) );
array_pop( $parts );
array_pop( $parts );
define( 'JPATH_BASE', implode( DS, $parts ) );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
include_once ( JPATH_BASE .DS.'components'.DS.'com_user'.DS.'controller.php');
include_once ( JPATH_BASE .DS.'libraries'.DS.'joomla'.DS.'base'.DS.'observable.php');
include_once ( JPATH_BASE .DS.'modules'.DS.'mod_jconnector'.DS.'extension_detector.php');
include_once ( JPATH_BASE .DS.'modules'.DS.'mod_jconnector'.DS.'classes.php');
include_once ( JPATH_BASE .DS.'modules'.DS.'mod_jconnector'.DS.'facebook'.DS.'php'.DS.'facebook.php');

$config =& JFactory::getConfig();
$config->setValue('config.absolute_path', JPATH_BASE);

$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
$db = & JFactory::getDBO();
$user = & JFactory::getUser();
JPluginHelper::importPlugin('system');

$module = J_ModuleHelper::getModule('jconnector', '');

There was another line somewhere after this doing the include of the facebook.php file, which was moved the the above code.

I also included a copy of the J! version of the JModuleHelper class in their version of "helper.php" called classes.php with the getModule and load functions in it versus your version (.. it didn't seem to integrate well, and broke something when I included that instead of the J! Version.) and renamed the class J_ModuleHelper.

Thanks for pointing me in the right direction!

P.S. Do you think it would be feasible to add [php] tag code highlighting syntax to these forums? Seems like it would be useful.
LaughDonor
Posts: 3
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#7942
Re:jConnector not Compatible 1 Year, 10 Months ago  
Hi,

Im still getting a blank screen while connecting to FB.
I also reformatted the includes in the jconnector_server.php as you did.
Seems like that wasnt sufficient..
I have no clue what you did with that JModuleHelper class, do I have to change any other file than the jconnector_server.php?

Thanks a lot!
Patrick Bozic
Posts: 1
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#21115
Re:jConnector not Compatible 1 Month, 1 Week ago  
Hi

To fix the this " Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script" error for jconnector module

Commented the below line in the file of your FTP

/www/libraries/joomla/environment/request.php

$failed |= is_numeric( $key ); 'As' // $failed |= is_numeric( $key );


After please clean cache your joomla administrator in "tools" menu and also delete your browser history i.e cookies , clean cache etc,,,

If you have any quires please contact me .

Thanks and Regards
Ashok K
ashokkadali.k@gmail.com
ashok kadali
Posts: 1
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
Open Source Training | Online Joomla! Training and Support
hosting joomla