404 page error on one product display

  • Posts: 18
  • Thank you received: 5
  • Hikashop Essential
3 years 2 weeks ago #339786

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 7.4.28
-- Browser(s) name and version -- : Chrome 98.0.4758.109

Hi, I am new to Hikashop

I am setting up my first products and I have 2 categories with 2 products in each.

One category is fine, the other (the first one I set up) one of the two products was throwing a 404 error when I clicked on the product in the listing.

I deleted the product and set it up again from scratch and it then worked, but now the other product is throwing a 404 error. That one was working fine before.

Any ideas?

Thanks x

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 2 weeks ago #339791

Hi,

Apparently, you've set the "force canonical URLs on listings" setting of the HikaShop configuration to "Use canonical URL and generate it if missing".
In that case, if the "canonical URL" of a product is empty, it will fill it automatically with a dynamically generated URL.
And on listings instead of generating dynamically the products URL, it will use the canonical URL.
So, if after the canonical URL is set for a product, you change either the SEF settings of HikaShop, the SEF settings of Joomla, the structure of your Joomla menu items or the alias of the product, they will be out of synch with the canonical URL and thus the canonical URL will be invalid.
I can see on your link that you have one product with the URL jom/shop/books/product/songs-of-a-seeker and one with the URL jom/index.php/bookshop/product/beyond-christianity
So I can conclude that after the canonical URL was generated for the "beyond christianity" product, you changed the Joomla SEF settings to remove the index.php from the SEF URLs. And that's why its canonical URL doesn't work anymore and you get that 404 error.
If you're in the middle of setting up your shop, or restructuring things around, you should turn off that setting of the HikaShop configuration so that the canonical URLs are not generated and that the URL to the products is generated dynamically all the time until you settle on your setup.

The following user(s) said Thank You: JenDee

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

  • Posts: 18
  • Thank you received: 5
  • Hikashop Essential
3 years 2 weeks ago #339800

Thank you this has resolved the issue, though I changed the SEF settings after the problem emerged so I must have done something else that affected it.

Looking forward to working with this extension, thank you for all your hard work on it. x

The following user(s) said Thank You: nicolas

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

Time to create page: 0.050 seconds
Powered by Kunena Forum