- Posts: 86
- Thank you received: 11
Joomla 4 incompatibilit error when updating Order Status from dropdown selection
2 years 7 months ago #359725
by simplecms
Joomla 4 incompatibilit error when updating Order Status from dropdown selection was created by simplecms
-- HikaShop version -- : HikaShop Business: 5.0.3
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2
-- Error-message(debug-mod must be tuned on) -- : An error has occurred.
0 Call to undefined method Joomla\CMS\Application\AdministratorApplication::isAdmin()
Call stack
# Function Location
1 () JROOT/media/com_hikashop/mail/order_status_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:2087
5 hikashopOrderClass->loadOrderNotification() JROOT/administrator/components/com_hikashop/views/order/view.html.php:491
6 OrderViewOrder->changestatus() JROOT/administrator/components/com_hikashop/views/order/view.html.php:28
7 OrderViewOrder->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2577
9 hikashopController->display() JROOT/administrator/components/com_hikashop/controllers/order.php:179
10 OrderController->changestatus() JROOT/libraries/src/MVC/Controller/BaseController.php:693
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2555
12 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
13 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
17 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
18 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
20 require_once() JROOT/administrator/index.php:32
Changing order status works fine when doing it from within the order page, but this error is thrown when using the dropdown on the Orders page in administrator. Tried disabling all Hikashop plugins, disabling all Emails, no change.
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.2
-- Error-message(debug-mod must be tuned on) -- : An error has occurred.
0 Call to undefined method Joomla\CMS\Application\AdministratorApplication::isAdmin()
Call stack
# Function Location
1 () JROOT/media/com_hikashop/mail/order_status_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:2087
5 hikashopOrderClass->loadOrderNotification() JROOT/administrator/components/com_hikashop/views/order/view.html.php:491
6 OrderViewOrder->changestatus() JROOT/administrator/components/com_hikashop/views/order/view.html.php:28
7 OrderViewOrder->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2577
9 hikashopController->display() JROOT/administrator/components/com_hikashop/controllers/order.php:179
10 OrderController->changestatus() JROOT/libraries/src/MVC/Controller/BaseController.php:693
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2555
12 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
13 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
17 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
18 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
20 require_once() JROOT/administrator/index.php:32
Changing order status works fine when doing it from within the order page, but this error is thrown when using the dropdown on the Orders page in administrator. Tried disabling all Hikashop plugins, disabling all Emails, no change.
Please Log in or Create an account to join the conversation.
2 years 7 months ago #359734
by nicolas
Replied by nicolas on topic Joomla 4 incompatibilit error when updating Order Status from dropdown selection
Hi,
Disabling the "order status notification" email in the System>Emails will definitely prevent the problem.
The error details you've provided indicates that you have an preload override for the order status notification email which has code which isn't compatible with Joomla 4.
If you rename the file /media/com_hikashop/mail/order_status_notification.preload.modified.php to something else via FTP, HikaShop won't find your override and it will work fine as it will use the default preload of the email, which doesn't have that incompatibility.
You must have customized the email in the past and you have old code in the preload override which isn't compatible with Joomla 4.
You might want to port your modifications of the preload from the old override to create a new override with the new code.
Disabling the "order status notification" email in the System>Emails will definitely prevent the problem.
The error details you've provided indicates that you have an preload override for the order status notification email which has code which isn't compatible with Joomla 4.
If you rename the file /media/com_hikashop/mail/order_status_notification.preload.modified.php to something else via FTP, HikaShop won't find your override and it will work fine as it will use the default preload of the email, which doesn't have that incompatibility.
You must have customized the email in the past and you have old code in the preload override which isn't compatible with Joomla 4.
You might want to port your modifications of the preload from the old override to create a new override with the new code.
Please Log in or Create an account to join the conversation.
2 years 7 months ago #359753
by simplecms
Replied by simplecms on topic Joomla 4 incompatibilit error when updating Order Status from dropdown selection
You are correct. Changing the file name fixed things. However, I should say that I unpublished this file in the backend System -> Emails and nothing changed with the error. That's why I thought it wasn't this file.
Please Log in or Create an account to join the conversation.
2 years 7 months ago #359754
by nicolas
Replied by nicolas on topic Joomla 4 incompatibilit error when updating Order Status from dropdown selection
Ah yes, you're right. The preload file is loaded before the check on the published flag. That's why you had the issue even with the email unpublished.
Please Log in or Create an account to join the conversation.
Time to create page: 0.102 seconds