[Skip to main content](#vessel-content)

#   Hikashop XMap Plugin with Joomla 4

##

- **[institutcalysta](/forum/user/57916-institutcalysta "View institutcalysta's Profile")**
- [![institutcalysta's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57916-institutcalysta "View institutcalysta's Profile") Topic Author
- [ Offline](/forum/user/57916-institutcalysta)

Less More

- Posts: 15
- Thank you received: 6
-
-

4 years 11 months ago [\#337263](#337263) by [institutcalysta](/forum/user/57916-institutcalysta "View institutcalysta's Profile")  *[Hikashop XMap Plugin with Joomla 4](/forum/30-integrations/903521-hikashop-xmap-plugin-with-joomla-4#337263 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.3  I did not manage to get the latest XMap plugin working with Joomla 4 (  www.hikashop.com/support/documentation/8...ation-with-xmap.html ).  It showed an error message instead of generating the XML sitemap.  I tracked this down to some deprecated function calls. &quot;JArrayHelper&quot; should be replaced by &quot;ArrayHelper&quot;.  Did I miss some update for this plugin somewhere else?  See below my modifications.  Add the use clause at the beginning of &quot;com&#95;hikashop.php&quot; within the XMap Hikashop plugin:  Then modify the code in function getTreeFct(&amp;$xmap, &amp;$parent, &amp;$params) as follows:  First call to XML may take some time, but products are correctly mapped again.  If a Hikashop developer could confirm this bug and update the plugin. It might help others trying to migrate to Joomla 4.  Best regards")* was created by *[institutcalysta](/forum/user/57916-institutcalysta "View institutcalysta's Profile")*

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 4.0.3

I did not manage to get the latest XMap plugin working with Joomla 4 ([ www.hikashop.com/support/documentation/8...ation-with-xmap.html](https://www.hikashop.com/support/documentation/80-hikashop-integration-with-xmap.html)).

It showed an error message instead of generating the XML sitemap.

I tracked this down to some deprecated function calls. "JArrayHelper" should be replaced by "ArrayHelper".

Did I miss some update for this plugin somewhere else?

See below my modifications.

Add the use clause at the beginning of "com_hikashop.php" within the XMap Hikashop plugin:
Code:

use Joomla\Utilities\ArrayHelper;

Then modify the code in function getTreeFct(&amp;$xmap, &amp;$parent, &amp;$params) as follows:
Code:

$task = ArrayHelper::getValue($link_vars,'task',''); $ctrl = ArrayHelper::getValue($link_vars,'ctrl',''); $itemid = $parent-&gt;id; if (empty($task)) $task = ArrayHelper::getValue($link_vars,'layout',''); if (empty($ctrl)) $ctrl = ArrayHelper::getValue($link_vars,'view',''); if (empty($itemid)) echo 'itemid vide';

First call to XML may take some time, but products are correctly mapped again.

If a Hikashop developer could confirm this bug and update the plugin. It might help others trying to migrate to Joomla 4.

Best regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDM1MjEtaGlrYXNob3AteG1hcC1wbHVnaW4td2l0aC1qb29tbGEtND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14293
-
-

4 years 11 months ago [\#337297](#337297) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop XMap Plugin with Joomla 4](/forum/30-integrations/903521-hikashop-xmap-plugin-with-joomla-4#337297 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 4.0.3  I did not manage to get the latest XMap plugin working with Joomla 4 (  www.hikashop.com/support/documentation/8...ation-with-xmap.html ).  It showed an error message instead of generating the XML sitemap.  I tracked this down to some deprecated function calls. &quot;JArrayHelper&quot; should be replaced by &quot;ArrayHelper&quot;.  Did I miss some update for this plugin somewhere else?  See below my modifications.  Add the use clause at the beginning of &quot;com&#95;hikashop.php&quot; within the XMap Hikashop plugin:  Then modify the code in function getTreeFct(&amp;$xmap, &amp;$parent, &amp;$params) as follows:  First call to XML may take some time, but products are correctly mapped again.  If a Hikashop developer could confirm this bug and update the plugin. It might help others trying to migrate to Joomla 4.  Best regards")*

Hi,

Thank you for your feedback. We hadn't tested the plugin yet on Joomla 4.
So it's great that you did and you even provided the fix for it.
I checked the code and the fix and it looks good yes.
We'll integrate the changes on our end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy85MDM1MjEtaGlrYXNob3AteG1hcC1wbHVnaW4td2l0aC1qb29tbGEtND90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.048 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
