News:

Support the VirtueMart project and become a member

Main Menu

Address changes not saved

Started by postkat, October 22, 2018, 23:27:50 PM

Previous topic - Next topic

postkat

Hi there,

This problem probably started after the upgrade to VirtueMart 3.4.2
Changes to the invoice address are not stored when the changes are made from the cart when logged in.
I have tested with beez3 (I can't find a beez5 template in any of my Joomla websites) and the result is the same.

Edit address link from cart: index.php?option=com_virtuemart&view=user&layout=editaddresscartBT -  Address changes are not stored
Virtuemart Edit user address link: index.php?option=com_virtuemart&view=user&layout=edit - Address changes are stored
Virtuemart account maintenance link: index.php?option=com_virtuemart&view=user&layout=editaddress  - Address changes are stored

The errors on the editaddresscartBT page when error reporting is set to simple:

Notice: Undefined index: id in .../components/com_virtuemart/helpers/vmtemplate.php on line 81

Notice: Undefined index: id in .../components/com_virtuemart/helpers/vmtemplate.php on line 82

Warning: A non-numeric value encountered in .../administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 1080

By the way: Joomla 3.8.13 PHP 7.2

Regards, Dorine

Milbo

#1
Please add to the file vmtemplate.php line 75 a vmdebug, so that we can see your loaded template.


vmdebug('getDefaultTemplate',$template);


Then enable the vmdebug and post the result here. The miracle is, that it loads a $template, but it has no id. Maybe the problem is the conversion of an object to array. I see that we used there the old simple method to cast the object to an array, which is not always working correctly. I use myself php7.2 and in my case it seems to work, hmmm.[/code]
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

postkat

#2
1 vmdebug 2 Languages, default shoplanguage (VmConfig::$jDefLang): nl_nl nl-NL Selected VM language (VmConfig::$vmlang): nl_nl nl-NL SEF: nl
2 vmdebug vmTime: time to load config: 0.00731706619262695
3 vmdebug 2 Languages, default shoplanguage (VmConfig::$jDefLang): nl_nl nl-NL Selected VM language (VmConfig::$vmlang): nl_nl nl-NL SEF: nl
4 vmdebug There is no requested itemid loaded home Itemid Var1:
603
5 vmdebug Start used Ram 18M
6 vmdebug Common jQuery is disabled
7 vmdebug getDefaultTemplate Var1:
Array
(
    [template] => truelight-2
    [params] => Joomla\Registry\Registry Object
        (
            [data:protected] => stdClass Object
                (
                )

            [initialized:protected] => 1
            [separator] => .
        )

)

8 vmdebug SSL enabled
9 vmdebug Going to set pw fields unrequired
10 vmdebug Common jQuery is disabled
11 vmdebug Common jQuery is disabled
12 vmdebug End used Ram 22M
13 vmdebug Peak memory peak 22M
14 vmdebug vmTime: "VirtuemartControllerUser" Finished task : 0.0523898601531982
15 vmdebug Common jQuery is disabled
16 vmdebug getVendorId normal shopper
17 vmdebug My Memory Limit in Bytes 272629760
18 vmdebug vmTime: Time consumed for shipment/payment plugins: 0.0572781562805176


Note: The default template is not the cause of the problem.

Milbo

Looks like you use a template override. Attention, I do not mean a layout override. I mean, that you set in joomla or vm (I think in joomla menu item) the template which should be used. But the template is not published or so. So it is not correctly loaded with id. It just uses the set name and finds files, but the entity "template" does not exist correctly or in other words, you run on a very old fallback (j1.5 times). It has nothing todo with your template, the problem is the installation of your template in joomla, imho.

Maybe you can fix it, by just using the disvovery feature. Or check the extension manager and ensure that the template is "enabled" respectivly "published".
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/