Customer Cart View suddenly gives error

  • Posts: 238
  • Thank you received: 21
  • Hikamarket Multivendor Hikashop Business Hikashop Essential
2 years 1 week ago #346405

-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.25
-- PHP version -- : 8.0.25
-- Browser(s) name and version -- : Any
-- Error-message(debug-mod must be tuned on) -- : errorerror - Uncaught Throwable of type Error thrown with message "Attempt to assign property "zone_code_2" on null". Stack trace: #0 [ROOT]/plugins/hikashopshipping/ups/ups.php(440): plgHikashopshippingUPS->_getShippingMethods() #1 [ROOT]/plugins/hikashopshipping/ups/ups.php(154): plgHikashopshippingUPS->_getBestMethods() #2 [ROOT]/libraries/src/Plugin/CMSPlugin.php(279): plgHikashopshippingUPS->onShippingDisplay() #3 [ROOT]/libraries/vendor/joomla/event/src/Dispatcher.php(486): Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() #4 [ROOT]/libraries/src/Application/EventAware.php(107): Joomla\Event\Dispatcher->dispatch() #5 [ROOT]/administrator/components/com_hikashop/classes/shipping.php(434): Joomla\CMS\Application\WebApplication->triggerEvent() #6 [ROOT]/administrator/components/com_hikashop/classes/cart.php(1373): hikashopShippingClass->getShippings() #7 [ROOT]/administrator/components/com_hikashop/views/cart/view.html.php(96): hikashopCartClass->getFullCart() #8 [ROOT]/administrator/components/com_hikashop/views/cart/view.html.php(20): CartViewCart->listing() #9 [ROOT]/libraries/src/MVC/Controller/BaseController.php(639): CartViewCart->display() #10 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2424): Joomla\CMS\MVC\Controller\BaseController->display() #11 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2141): hikashopController->display() #12 [ROOT]/libraries/src/MVC/Controller/BaseController.php(672): hikashopController->listing() #13 [ROOT]/administrator/components/com_hikashop/helpers/helper.php(2402): Joomla\CMS\MVC\Controller\BaseController->execute() #14 [ROOT]/administrator/components/com_hikashop/hikashop.php(73): hikashopController->execute() #15 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...') #16 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() #17 [ROOT]/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #18 [ROOT]/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent() #19 [ROOT]/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #20 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute() #21 [ROOT]/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute() #22 [ROOT]/administrator/index.php(32): require_once('...') #23 {main}

Not sure if this is a shipping plugin error or a Customer -> Cart error.

I was reviewing some cart entries fine and then suddenly started getting this error:

An error has occurred.

    0 Attempt to assign property "zone_code_2" on null

It was never an issue before, and another sister site on the same server/config has no problems.

It looks like an issue with the UPS shipping plugin, but I have no idea why, as I haven't touched it.

I have 3 UPS payment methods enabled, I disabled them one by one, and it seems to be just one of them causing the error when enabled.

It doesn't make sense why just one of the methods causes the issues and the other two don't and only for this view.

I did make sure to push up the latest version of HikaShop from today in case any post-4.6.2 updates might affect it, but it didn't help.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 week ago #346409

Hi,

Thanks for the error report. This error seems to indicate that the user of the cart doesn't have a country selected in the shipping address linked to his cart.
I've added a patch for this. Download again the install package of the 4.6.2 on our website and install it on yours again and it will add the patch.

The following user(s) said Thank You: jazzmang

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum