Joomla 4: 0 Call to undefined method on End of Checkout

  • Posts: 284
  • Thank you received: 6
2 years 3 months ago #343747

-- url of the page with the problem -- :
-- HikaShop version -- : 4.6.1
-- Joomla version -- : ‎4.1.5
-- PHP version -- : 7.4.30
-- Browser(s) name and version -- : Any
-- Error-message(debug-mod must be tuned on) -- : 0 Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

At the final step of checkout, on pressing submit, it throws the following error:
0 Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

No order is created.

For testing, you can use this coupon for 99% discount: SYSTEM-TEST-2

I have sent you login details.

Here is the debug grid:

0 Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()
Call stack
# Function Location
1 () JROOT/media/com_hikashop/mail/order_creation_notification.preload.modified.php:62
2 include() JROOT/administrator/components/com_hikashop/classes/mail.php:362
3 hikashopMailClass->loadEmail() JROOT/administrator/components/com_hikashop/classes/mail.php:31
4 hikashopMailClass->get() JROOT/administrator/components/com_hikashop/classes/order.php:1997
5 hikashopOrderClass->loadOrderNotification() JROOT/administrator/components/com_hikashop/classes/order.php:441
6 hikashopOrderClass->save() JROOT/administrator/components/com_hikashop/classes/order.php:906
7 hikashopOrderClass->createFromCart() JROOT/components/com_hikashop/controllers/checkout.php:671
8 checkoutController->confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:735
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2382
10 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
11 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
12 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:204
15 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:243
16 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
18 require_once() JROOT/index.php:32

Last edit: 2 years 3 months ago by MSTACE.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 3 months ago #343756

Hi,

This indicates that you have an old override of the "preload" of the "order creation notification" email.
This old override has some code on line 62 which isn't compatible with Joomla 4 and that's why it breaks.
You can rename the file /media/com_hikashop/mail/order_creation_notification.preload.modified.php via FTP to deactivate the override so that it uses the latest version's default preload. It will remove the error.
And if necessary, you can recustomize it via the interface in the backend.

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

  • Posts: 284
  • Thank you received: 6
2 years 3 months ago #343759

That makes sense. This website is one of the oldest HikaShop installs I have.

Renaming the file did not stop the error.

I ended up deleting all of the customization for the emails.
That is working now.

Thank you.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum