Tree structure bug after update to 1.6.1

  • Posts: 134
  • Thank you received: 6
9 years 8 months ago #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->category (infinite loop)
2. Product->Related products (no subcategories are shown)
3. Product->Options (no subcategories are shown)

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

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #195006

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 134
  • Thank you received: 6
9 years 8 months ago #195034

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 or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #195068

Hi,

HikaMarket generate a link for the ajax calls

category&task=getTree&category_id={ID}
But it looks like when the URL is process by the router, the "{ID}" is replaced by something it shouldn't:
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
	'tree_url' => 'category&task=getTree&category_id={ID}',
	'tree_key' => '{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
$namebox_options['tree_url'] = hikamarket::completeLink($namebox_options['tree_url'], false, false, true);
By
			$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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: filiar

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

  • Posts: 134
  • Thank you received: 6
9 years 8 months ago #195089

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->ManageExtensions->HikaMarket write &task=getTree in the Do not SEF URLs matching regular expression field

Regards!

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

Moderators: Obsidev
Time to create page: 0.062 seconds
Powered by Kunena Forum