Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Problem with Chameleon Virtuemart Rules after VirtueMart 3.8.6 update

Problem with Chameleon Virtuemart Rules after VirtueMart 3.8.6 update

JUser: :_load: Unable to load user with ID: -1

Please help

metabern
Junior Modder
ranks
useravatar
Offline
20 Posts
Administrator has disabled public posting

Re: Problem with Chameleon Virtuemart Rules after VirtueMart 3.8.6 update

Hi

I have the same problem here. Updated Virtuemart from 3.8.4 to 3.8.6. When using Chameleon Rules to set VirtueMart shopper groups, we see this message in Joomla frontend:

JUser: :_load: Unable to load user with ID: -1

It seems this originates from /plugins/chameleon/virtuemartrules/virtuemartrules.php line 108:

$usermodel->_id = -1; // invalidate so the getUser does not return previous cached value

Apparently VirtueMart behaviour changed in version 3.8.6 and setting _id to -1 now results in getUser()->virtuemart_user_id also being -1! I resolved this by adding a version check for this line:

if (version_compare($version, '3.8.6', 'lt')) {
  $usermodel->_id = -1; // invalidate so the getUser does not return previous cached value
}

Stephen, could you have a look at this and include a fix in the next release of Chameleon?

Thanks a lot, best regards,
Stefan

sts
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5946
Total Posts Today:
2
User Info:
 
Total Users:
7675
Newest User:
ferelya229
Members Online:
0
Guests Online:
176

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked