Category selection problem with existing products

  • Posts: 42
  • Thank you received: 2
8 years 8 months ago #231193

SOLVED - This was a browser cache issue in Chrome. Clearing the cache resolved the problem.

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.5

I'm having a strange problem with category selection. On an existing product, clicking in the Category field brings up a selection explorer that doesn't match the current structure of the categories. If I begin typing in the name of the desired category in the Category field, then and only then does it show up in the selection explorer. I have attached a graphic illustrating the issue. Center top in the image is an inset with the Category structure, the left side of the image shows the explorer I see when clicking in the Category field, right side shows the result of typing the name of the category. I've cleared cache, logged out and back in, rebuilt categories, and the behavior persists.


It's amazing how the omission of a semicolon can absolutely ruin an otherwise pleasant evening.
Attachments:
Last edit: 8 years 8 months ago by spoonbow. Reason: Solution found and added to original post

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 8 months ago #231206

Hi,

I've never seen that.
If you don't have yet products configured, you can empty the hikashop_category table and the hikashop_product_category table via your phpmyadmin and then install the HikaShop package.
That will reset the categories to their default structure and you can then add the categories again. It should then hopefully work properly.

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

  • Posts: 42
  • Thank you received: 2
8 years 8 months ago #231286

Weird, right? The DB tables look good - No orphaned/dissociated entries. As a matter of fact, I don't even see the old "Beer" category in the categories table. Where does the data for the category explorer on the product edit screen come from? Is it possible it's cached somewhere? I don't have too many products entered yet, but I'd rather not repeat the exercise of entering them again if I don't have to.

Incidentally, the problem exists with new products as well. For whatever reason I was thinking that Categories were displaying properly for new products - I was mistaken...

Matt


It's amazing how the omission of a semicolon can absolutely ruin an otherwise pleasant evening.
Last edit: 8 years 8 months ago by spoonbow. Reason: Additional information

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

  • Posts: 42
  • Thank you received: 2
8 years 8 months ago #231299

OK, looks like Chrome cached the result of the ".../administrator/index.php?option=com_hikashop&ctrl=category&task=getTree&category_id=2" call two days ago and has been using it for subsequent calls. Did a search of my cache and found the following, which shows the old "Beer" category. Accessed the edit product page with a clean browser cache and the proper categories showed up.

Matt


It's amazing how the omission of a semicolon can absolutely ruin an otherwise pleasant evening.
Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 8 months ago #231313

Hi,

Try to add the line:
hikashop_nocache();
after the line:
function getTree() {
in the file administrator/components/com_hikashop/controllers/category.php
That should force the browser to not cache the data for the category explorer and thus you should not have the problem anymore.

The following user(s) said Thank You: spoonbow

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

Time to create page: 0.057 seconds
Powered by Kunena Forum