dreaded 'isAdmin' error

  • Posts: 71
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
1 year 8 months ago #349614

-- url of the page with the problem -- : staging.bridgenz.co.nz/checkout/confirm
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.1.16
-- Browser(s) name and version -- : Firefox
-- Error-message(debug-mod must be tuned on) -- : 0: Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

On the final checkout to order, I get the IsAdmin error. The error logs from Plesk say "Invalid status line from script 'index.php': 0, referer: staging.bridgenz.co.nz/checkout " which is an SEF url. There are no overrides of the code that relate to checkout. This is an old version of Hikashop that has been upgraded from J3 to J4 recently so there may be older files that have not been overridden in the upgrade. I had a number of issues previously relating to Mass Actions and Geolocation plugins but I disabled those and Hikashop came right until the final step.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 8 months ago #349618

Hi,

Please turn on the "debug" setting of the Joomla configuration and try again.
It should display more information about the error message which will allow us to tell you what to do.

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

  • Posts: 71
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
1 year 8 months ago #349624

Thanks, I had Debug turned on but it was being masked by 4SEO and 4SEF (aka SH404). the debug is

Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()
Home Page
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:189
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:674
8 checkoutController->confirm() JROOT/libraries/src/MVC/Controller/BaseController.php:672
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2409
10 hikashopController->execute() JROOT/components/com_hikashop/hikashop.php:88
11 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
12 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:355
14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:200
15 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:241
16 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:294
17 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
18 require_once() JROOT/index.php:32

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 8 months ago #349626

Hi,

The issue comes from old code you have in the preload override of the email order creation notification.
So you need to go in the menu System>Emails of HikaShop to sort that out.
The simplest is to just delete the customization of the preload from the listing there. That will fix the problem since the faulty code is not in the current default version of the preload.
However, if you have this override, it means you had customized it in the past. So you would lose that customization if you had any.
So first, I would recommend checking what you have in there.
And if there is code modification you want to preserve, you need to copy/paste it somewhere else so that you can reapply it to the current default version of the preload, after you've deleted the faulty old override.

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

  • Posts: 71
  • Thank you received: 0
  • Hikashop Business Hikashop Essential
1 year 8 months ago #349656

Yes, this was present in two modified PHP files in the email creation process. fixed now and all work OK. thanks

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

Time to create page: 0.058 seconds
Powered by Kunena Forum