Migration 3 to 4

  • Posts: 47
  • Thank you received: 1
  • Hikashop Business
2 years 1 month ago #345366

-- url of the page with the problem -- : www.paradepot.ch/new/
-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.3
-- PHP version -- : 8.1
-- Browser(s) name and version -- : div.
-- Error-message(debug-mod must be tuned on) -- : 0 Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()

I have emigrated hikashop from joomla 3 to 4.
Everything is going well until the purchase is completed.

0 Call to undefined method Joomla\CMS\Application\SiteApplication::isAdmin()
Call stack
# Function Location
1 () JROOT/media/com_hikashop/mail/order_creation_notification.text.modified.php:70
2 require() JROOT/administrator/components/com_hikashop/classes/mail.php:367
3 hikashopMailClass->loadEmail() JROOT/administrator/components/com_hikashop/classes/mail.php:32
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:672
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2390
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
2 years 1 month ago #345368

Hi,

That error comes from custom code you have for the "order creation notification" for the "text" version of the email. So in the menu System>Emails, click on the delete icon for the "text" customization of that email and it will remove that error.
If you have other customized emails you might get a similar error (for the order status notification for example).

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

  • Posts: 47
  • Thank you received: 1
  • Hikashop Business
2 years 1 month ago #345394

Thanks that works.
Next problem.
When I register a new address for a new order, another already existing address is displayed.

Last edit: 2 years 1 month ago by publiduty.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345398

Hi,

Can you provide more information on the issue ?
Is that another address of the user account you're currently logged in ?
Or are you talking about the address of another user ?
Could you provide precise steps to reproduce the issue on your website (with screenshots if possible) ?

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

  • Posts: 47
  • Thank you received: 1
  • Hikashop Business
2 years 1 month ago #345411

The joomla users and hika users do not match.
Is there a way to delete all hika users and resynchronise them with the joomla users?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345417

Hi,

Ah, you must have used a migration tool which changed the ids of the users in the joomla users table and thus the user_cms_id in the hikashop_user table doesn't match with the Joomla user id anymore.

Click on the "check database" button of the HikaShop configuration page and it will resynch the ids based on the email addresses.

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

  • Posts: 47
  • Thank you received: 1
  • Hikashop Business
2 years 1 month ago #345418

Yes, I have imported the joomla users with a tool.
I checked the database but the IDs are still not correct and I still have users without names and usernames.



OK Table "hikashop_address" checked

OK Table "hikashop_badge" checked

OK Table "hikashop_banner" checked

OK Table "hikashop_cart" checked

OK Table "hikashop_cart_product" checked

OK Table "hikashop_category" checked

OK Table "hikashop_characteristic" checked

OK Table "hikashop_click" checked

OK Table "hikashop_config" checked

OK Table "hikashop_currency" checked

OK Table "hikashop_discount" checked

OK Table "hikashop_download" checked

OK Table "hikashop_entry" checked

OK Table "hikashop_field" checked

OK Table "hikashop_file" checked

OK Table "hikashop_filter" checked

OK Table "hikashop_geolocation" checked

OK Table "hikashop_history" checked

OK Table "hikashop_limit" checked

OK Table "hikashop_massaction" checked

OK Table "hikashop_order" checked

OK Table "hikashop_orderstatus" checked

OK Table "hikashop_order_product" checked

OK Table "hikashop_payment" checked

OK Table "hikashop_price" checked

OK Table "hikashop_product" checked

OK Table "hikashop_product_category" checked

OK Table "hikashop_product_related" checked

OK Table "hikashop_plugin" checked

OK Table "hikashop_shipping" checked

OK Table "hikashop_shipping_price" checked

OK Table "hikashop_tax" checked

OK Table "hikashop_taxation" checked

OK Table "hikashop_user" checked

OK Table "hikashop_variant" checked

OK Table "hikashop_vote" checked

OK Table "hikashop_vote_user" checked

OK Table "hikashop_waitlist" checked

OK Table "hikashop_widget" checked

OK Table "hikashop_zone" checked

OK Table "hikashop_zone_link" checked

OK Table "hikashop_warehouse" checked

OK Table "hikashop_email_log" checked

Info Missing core categories fixed

OK Product categories checked

OK Variants orphan links cleaned

OK Joomla users synchronized

OK User email addresses synchronized

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345420

What do you mean by "the IDs are still not correct" ? The ID column in the users listing of HikaShop is the user_id not the user_cms_id, so it's normal it doesn't match the id of the user in Joomla.
And "I still have users without names and usernames" could be just because you have guest users. When someone places an order as a guest he will appear in the HikaShop user listing without a name/username.
So both could be normal.
The question is whether you see the address of someone else if you login and access the checkout (and you need to first delete the cart and logout/login so make sure the address is not cached).

I checked the code of the check database button and it runs this MySQL query:

UPDATE `#__hikashop_user` AS hku LEFT JOIN `#__users` AS ju ON hku.`user_email`=ju.`email` SET hku.`user_cms_id`=ju.`id` WHERE hku.`user_cms_id`!=ju.`id`
So after this query run, it's not possible that you still have a user in HikaShop with a different user_cms_id than the id of the user in HikaShop if they both have the same email address. So if you say that's what you have, then there is something else to it like you've clicked on check database on a different website than the one where you're looking at the users or something.

Last edit: 2 years 1 month ago by nicolas.

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

  • Posts: 47
  • Thank you received: 1
  • Hikashop Business
2 years 1 month ago #345586

I still have the problem that the users do not match the email address.

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 1 month ago #345601

Hi,

That's strange, you have the email address of the user as username ?
In that case, run the MySQL query:

UPDATE `#__hikashop_user` AS hku LEFT JOIN `#__users` AS ju ON hku.`user_email`=ju.`username` SET hku.`user_cms_id`=ju.`id` WHERE hku.`user_cms_id`!=ju.`id`
via your PHPMyAdmin (make sure you replace #__ by your table prefix in the Joomla configuration and it should help).

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

Time to create page: 0.047 seconds
Powered by Kunena Forum