News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Bug report and fix for config file "Exception in loadConfig for unserialize"

Started by omniroot, June 22, 2014, 15:11:55 PM

Previous topic - Next topic

omniroot

I just did a fresh install of Joomla 3.3.1, and installed VirtueMart 2.9.6 from the archive file on the virtuemart webpage.

I ran into an error after saving the virtuemart configuration, where I would see the message:
QuoteException in loadConfig for unserialize __utmz s:69:"88103696.1403146316.1.1.utmcsr

To avoid this message, enter your virtuemart config and just save it one time

Exception in loadConfig for unserialize utmccn (direct)

To avoid this message, enter your virtuemart config and just save it one time

Exception in loadConfig for unserialize utmcmd (none)";

To avoid this message, enter your virtuemart config and just save it one time

After much searching through the code, and using chrome's dev tools, I figured out what the problem is:

the __umtz, utmccn, and utmcmd variables were stored in a cookie for my site.

In the VirtuemartControllerConfig controller at administrator/components/com_virtuemart/controllers/config.php, near the top of the save function, there is a line:
$data = vRequest::getRequest();
But all of the data we need is being sent through the form as POST data, so why are we using getRequest() that will fetch cookie data as well?

We should change this line to:
$data = vRequest::getPost();

and the issue will be fixed.

I have tested this on my install, and the fix was successful.

Please path this in the next release.

Also, can someone please email me about contributing these types of fixes to virtuemart development?

Thank you,

Hartley

Milbo

Many thanks. Nice that you found the reason for it. Is fixed, thank you.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bornakke

On VM 2.9.8 Joomla 3.3.1 this bug appears to be back again:

I get the following error whenever I enter my shop (frontend) or virtuemart backend:
Exception in loadConfig for unserialize __utmz s:70:"181814309.1404249068.1.1.utmcsr
To avoid this message, enter your virtuemart config and just save it one time
Exception in loadConfig for unserialize utmccn (direct)
To avoid this message, enter your virtuemart config and just save it one time
Exception in loadConfig for unserialize utmcmd (none)";
To avoid this message, enter your virtuemart config and just save it one time


I have ofcause tryed to save the config several times.