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

#   Tree structure bug after update to 1.6.1

##

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

Less More

- Posts: 134
- Thank you received: 6
-
-
-
- [](https://madein-bg.com)
-

11 years 7 months ago [\#194994](#194994) by [filiar](/forum/user/33070-filiar "View filiar's Profile")  *[Tree structure bug after update to 1.6.1](/forum/22-market-bug-report/875719-tree-structure-bug-after-update-to-1-6-1#194994 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.16  Hi,  Some category tree bugs appeared:  In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.  In other places no subcategories and no products are shown  The screenshot is from the product edit page where the following bugs exists:  1. Product-&gt;category (infinite loop) 2. Product-&gt;Related products (no subcategories are shown) 3. Product-&gt;Options (no subcategories are shown)  This is only happening in frontend and works as expected in backend")* was created by *[filiar](/forum/user/33070-filiar "View filiar's Profile")*

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.1
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.16

Hi,

Some category tree bugs appeared:

In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.

In other places no subcategories and no products are shown

The screenshot is from the product edit page where the following bugs exists:

1. Product-&gt;category (infinite loop)
2. Product-&gt;Related products (no subcategories are shown)
3. Product-&gt;Options (no subcategories are shown)

This is only happening in frontend and works as expected in backend

- [ ![tree.png](/forum/attachment/23141) ](/forum/attachment/23141 "tree.png") [ ](/forum/attachment/23141?download=1 "tree.png")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

11 years 7 months ago [\#195006](#195006) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Tree structure bug after update to 1.6.1](/forum/22-market-bug-report/875719-tree-structure-bug-after-update-to-1-6-1#195006 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.16  Hi,  Some category tree bugs appeared:  In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.  In other places no subcategories and no products are shown  The screenshot is from the product edit page where the following bugs exists:  1. Product-&gt;category (infinite loop) 2. Product-&gt;Related products (no subcategories are shown) 3. Product-&gt;Options (no subcategories are shown)  This is only happening in frontend and works as expected in backend")*

Hi,

I'm not able to reproduce the issue in my local website or in the demo website.
Do you have some overrides for the product edition page ? Would it be possible to see the issue directly ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 134
- Thank you received: 6
-
-
-
- [](https://madein-bg.com)
-

11 years 7 months ago [\#195034](#195034) by [filiar](/forum/user/33070-filiar "View filiar's Profile")  Replied by *[filiar](/forum/user/33070-filiar "View filiar's Profile")* on topic *[Tree structure bug after update to 1.6.1](/forum/22-market-bug-report/875719-tree-structure-bug-after-update-to-1-6-1#195034 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.16  Hi,  Some category tree bugs appeared:  In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.  In other places no subcategories and no products are shown  The screenshot is from the product edit page where the following bugs exists:  1. Product-&gt;category (infinite loop) 2. Product-&gt;Related products (no subcategories are shown) 3. Product-&gt;Options (no subcategories are shown)  This is only happening in frontend and works as expected in backend")*

Hi, Jerome

I will send you login credentials on PM.

The site is on developement, so don't hesitate to test.

Regards!

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4077
-
- [](http://obsi.dev)
-

11 years 7 months ago [\#195068](#195068) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Tree structure bug after update to 1.6.1](/forum/22-market-bug-report/875719-tree-structure-bug-after-update-to-1-6-1#195068 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.16  Hi,  Some category tree bugs appeared:  In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.  In other places no subcategories and no products are shown  The screenshot is from the product edit page where the following bugs exists:  1. Product-&gt;category (infinite loop) 2. Product-&gt;Related products (no subcategories are shown) 3. Product-&gt;Options (no subcategories are shown)  This is only happening in frontend and works as expected in backend")*

Hi,

HikaMarket generate a link for the ajax calls Code:

category&amp;task=getTree&amp;category_id={ID}

But it looks like when the URL is process by the router, the "{ID}" is replaced by something it shouldn't: Code:

vendor-form/category/gettree/id

So HikaMarket can't replace "{ID}" but the category id because "{ID}" is replaced by "id" by your SEF extension.

You can see to edit the file "administrator/components/com_hikamarket/types/namebox.php" and modify Code:

'tree_url' =&gt; 'category&amp;task=getTree&amp;category_id={ID}', 'tree_key' =&gt; '{ID}',

to use something else than "{ID}" but I don't know if you could use some special characters in order to be sure that the replacement will not break something else in the URL.

Otherwise, in that same file, you could replace Code:

$namebox_options['tree_url'] = hikamarket::completeLink($namebox_options['tree_url'], false, false, true);

By Code:

$tree_url = hikamarket::completeLink($namebox_options['tree_url'], false, false, true); if(strpos($tree_url, $namebox_options['tree_key']) === false) { $u = uniqid(); $tree_url = hikamarket::completeLink(str_replace($namebox_options['tree_url'], $u, $namebox_options['tree_url']), false, false, true); $tree_url = str_replace($u, $namebox_options['tree_url'], $tree_url); } $namebox_options['tree_url'] = $tree_url;

It should detect if the key is removed from the URL and will try to use a random key without special character into.

Regards,

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [filiar](/forum/user/33070-filiar "View filiar's Profile")

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

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

Less More

- Posts: 134
- Thank you received: 6
-
-
-
- [](https://madein-bg.com)
-

11 years 7 months ago [\#195089](#195089) by [filiar](/forum/user/33070-filiar "View filiar's Profile")  Replied by *[filiar](/forum/user/33070-filiar "View filiar's Profile")* on topic *[Tree structure bug after update to 1.6.1](/forum/22-market-bug-report/875719-tree-structure-bug-after-update-to-1-6-1#195089 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.16  Hi,  Some category tree bugs appeared:  In some places category trees are showing as infinite loop. Only the first categories are shown and each of them shows the main category as it's subcategory.  In other places no subcategories and no products are shown  The screenshot is from the product edit page where the following bugs exists:  1. Product-&gt;category (infinite loop) 2. Product-&gt;Related products (no subcategories are shown) 3. Product-&gt;Options (no subcategories are shown)  This is only happening in frontend and works as expected in backend")*

Hi, Jerome.

Your answer showed me the solution (as allways). Thank You.

I use JoomSEF component for URL SEF rewriting. And as You said this extension braked the Ajax requests.
For those that have come to that point, there is the easiest workaround that I found.

in JoomSEF-&gt;ManageExtensions-&gt;HikaMarket write **&amp;task=getTree** in the **Do not SEF URLs matching regular expression** field

Regards!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzg3NTcxOS10cmVlLXN0cnVjdHVyZS1idWctYWZ0ZXItdXBkYXRlLXRvLTEtNi0xP3RtcGw9bWFya2Rvd24=) 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?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.075 seconds

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