Topic-icon SClogin & virtumart 2.0.18a

Active Subscriptions:

None
Just upgrade to VM 2.0.18a, using SClogin with VM as the registration component - i'm getting the following error.

Fatal error: Call to a member function url() on a non-object in /home/twodevel/public_html/dads/modules/mod_sclogin/mod_sclogin.php on line 41

think you need to update the module.
The topic has been locked.
Support Specialist
13 years 5 months ago #29741 by alzander
Yes, we're going to be updating the SCLogin module shortly. If you upgraded from VM1 to VM2 and are on the newer versions of VM2, that can be a problem. To fix, please edit that file you mention. Around line 41, you'll see:
else if ($registerType == "virtuemart")
{
    if(file_exists(JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'virtuemart_parser.php'))
    {
        require_once (JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'virtuemart_parser.php');
        global $sess;
        $registerLink = $sess->url( SECUREURL.'index.php?option=com_virtuemart&page=shop.registration' );
    }
    else //Virtuemart 2
    {
        $registerLink = JRoute::_("index.php?option=com_virtuemart&view=user", false);
    }
    $profileLink = '';
}
Remove that top block so it just looks like:
else if ($registerType == "virtuemart")
{
        $registerLink = JRoute::_("index.php?option=com_virtuemart&view=user", false);
    $profileLink = '';
}
That should get you going. Let us know if you have any other questions or issues.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 5 months ago #29770 by [email protected]
thanks, that works. - for information i upgraded from 2.0.16 to 2.0.18a
The topic has been locked.
Support Specialist
13 years 5 months ago #29783 by alzander
Thanks for letting us know what changed. We'll have an update for the SCLogin module out with the next release, or sooner if we get an influx of users needing the change.

Best of luck,
Alex
The topic has been locked.
Active Subscriptions:

None
13 years 4 months ago #29962 by alberto1964
I have the same problem, and maked what you do, but now I receive an other error message:

COM_VIRTUEMART_MIGRATION_WARN_VM1_EXTENSIONS
Fatal error: Call to a member function url() on a non-object in /home/deshopp/public_html/portalweb/modules/mod_sclogin/mod_sclogin.php on line 81

my code is:

if(file_exists(JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'virtuemart_parser.php'))

{

require_once (JPATH_SITE.DS.'components'.DS.'com_virtuemart'.DS.'virtuemart_parser.php');

global $sess;

$registerLink = $sess->url( SECUREURL.'index.php?option=com_virtuemart&page=shop.registration' );

}

else //Virtuemart 2

{

$registerLink = JRoute::_("index.php?option=com_virtuemart&view=user", false);
$profileLink = '';

}
The topic has been locked.
Support Specialist
13 years 4 months ago #29965 by alzander
If that's your code, it doesn't sound like you removed the code as I mentioned above. You'll want to remove that whole if block that starts with 'if (file_exists(...'. That is improperly detecting VM1 on a VM2 site.

Let us know if that doesn't help, but I think you need to simply remove extra code that's causing the problem.

Thanks,
Alex
The topic has been locked.