VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: man.of.earth on July 26, 2019, 13:26:28 PM

Title: Default country (and city) name is replaced with country ID on the checkout page
Post by: man.of.earth on July 26, 2019, 13:26:28 PM
Hello,

I noticed that for some time (versions of VM), the default country name is replaced with country ID on the checkout page.
When logging into the account, there is thrown the "Call to a member function setQuery() on null" error.
Debugging shows the following:
Call stack
# Function Location
1 () JROOT/administrator/components/com_virtuemart/models/state.php:128
2 VirtueMartModelState::testStateCountry() JROOT/administrator/components/com_virtuemart/models/user.php:868
3 VirtueMartModelUser->validateUserData() JROOT/components/com_virtuemart/helpers/cart.php:1447
4 VirtueMartCart->validateUserData() JROOT/components/com_virtuemart/helpers/cart.php:1281
5 VirtueMartCart->checkoutData() JROOT/components/com_virtuemart/controllers/cart.php:106
6 VirtueMartControllerCart->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_virtuemart/virtuemart.php:120
8 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
9 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
10 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
11 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
12 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
13 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Title: Re: Default country name is replaced with country ID on the checkout page
Post by: StefanSTS on July 26, 2019, 13:56:36 PM
Thanks for reporting that, I guess you are talking about VM 3.5.10097.

I saw that recently too somewhere and was not sure if it was my messed up test installation or VM itself.

Stefan
Title: Re: Default country name is replaced with country ID on the checkout page
Post by: man.of.earth on August 27, 2019, 18:29:31 PM
Today I noticed that the city too (chosen from the dropdown) is displayed as city ID, and not as its name.
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: StefanSTS on August 27, 2019, 20:15:31 PM
It's fixed in the latest release.
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: chaldama on September 02, 2019, 16:21:22 PM
On 3 of my websites which I updated to VM 3.6.0.10113 I notice that the country field is not working at all anymore which makes it impossible for users to checkout, you can see this behaviour e.g. at https://vergaderkoffers.nl/winkelmandje. The same problem remains in the default template.
I will wait with updating my other websites.
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: Jörgen on September 02, 2019, 16:57:17 PM
Using custom one page checkout ?
Jörgen @ Kreativ Fotografi
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: chaldama on September 02, 2019, 18:19:15 PM
Yes I use VMUikit which has its own OPC. I have contacted Joomlapro for support but also in the default template and with all VMuikit elements disabled it looks weird. I will let you know what JoomlaPro finds.
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: Milbo on September 07, 2019, 08:34:10 AM
Quote from: arcturus on August 27, 2019, 18:29:31 PM
Today I noticed that the city too (chosen from the dropdown) is displayed as city ID, and not as its name.

Cities are not stored on a table, only countries and states. So that is from my point of view impossible. Of course, you see what you see, but the reason cannot be within the vm core.
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: Milbo on September 07, 2019, 08:36:26 AM
Chaldama, please test the new core http://dev.virtuemart.net/attachments/1177/com_virtuemart.3.6.1.10121_package_or_extract.zip

There was a missing "$db = JFactory::getDbo()" in case you use only states. So it is quite likely fixed.
Title: Re: Default country (and city) name is replaced with country ID on the checkout
Post by: man.of.earth on September 07, 2019, 15:15:15 PM
Quote from: Milbo on September 07, 2019, 08:34:10 AM
Cities are not stored on a table, only countries and states.
I meant ,,states" but written ,,cities" :)
Title: Re: Default country (and city) name is replaced with country ID on the checkout page
Post by: chaldama on September 07, 2019, 18:35:32 PM
Thank you Milbo, problem is solved!