404 errors for seome products after import

  • Posts: 30
  • Thank you received: 0
4 months 6 days ago #328022

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.4
-- Browser(s) name and version -- : Firefox, Safari, Chrome

Hello,

I use csv file for importing products and it seems to work fine but... when I click some products in category view (to enter product view) then I get 404 error.
Really don't know why and how to solve it.
Have a look at screenshot , please.

I'm testing this process, I uploaded last products for a few times, at the gegining I had a problem with setting proper file charset - but I don't know if all this is related to this 404 problem.

link to products view (category):
serwer2014720.home.pl/shop/produkty

products with 404 problem (examples, from top of the page):
1. serwer2014720.home.pl/shop/produkty/prod...-kuskus-perlowy-1-kg
2. serwer2014720.home.pl/shop/produkty/prod...zmienna-wiejska-1-kg
3. serwer2014720.home.pl/shop/produkty/prod...czmienna-peczak-1-kg
(screenshot attached)

Please, help.

Regards,
Radek

Attachments:

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

  • Posts: 72791
  • Thank you received: 11102
  • MODERATOR
4 months 5 days ago #328025

Hi,

This 404 error means that you likely have an error between the "product_canonical" column of the CSV and the "product_alias" or "product_name" fields which do not match.
I can't say for sure without looking at the CSV but apparently you don't have the value "kasza-kuskus-perlowy-1-kg" in the "product_alias" column of your CSV (or you don't have that column at all ?) and thus the system is not able to find the product corresponding to the URL.

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

  • Posts: 30
  • Thank you received: 0
4 months 5 days ago #328057

"I can't say for sure without looking at the CSV but apparently you don't have the value "kasza-kuskus-perlowy-1-kg" in the "product_alias" column of your CSV (or you don't have that column at all ?)"
and you are right - I do not have this column in CSV at all but the question is - why some products have 404 and some of them don't ?
(I attached CSV)

Best,
Radek

Attachments:

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

  • Posts: 72791
  • Thank you received: 11102
  • MODERATOR
4 months 5 days ago #328058

Hi,

You have the "Remove products and categories id in URLs" setting activated in the HikaShop configuration.
So in that case the id of the product is not included in the URL of the product details page.
The alias (like "kasza-kuskus-perlowy-1-kg") is taken from the "alias" option of the product if specified, or generated from the "product name" of the product. As you have the "Unicode Aliases" setting deactivated in the Joomla configuration, only a-z and 0-9 characters are allowed for the alias. So if you have other characters in the product name, they will be stripped when generating the URL of the product details page on the listings.
Then, when you click on the link on the listing, in order to know which product to load, the routing system can only base itself on the alias of the URL so, for example: "kasza-kuskus-perlowy-1-kg". It will try to search for a product with that alias, and if no product is found, it will try to look for a product with that name (replacing the - with spaces).
So the reason why it work for some products and not others is because some products don't have special characters in their name while others do.
So there are several solutions to your issue:
- activate the "Unicode Aliases" setting of the Joomla configuration to allow for special characters in the URLs
- turn off the "Remove products and categories id in URLs" setting to keep the id of the products in the URLs (and thus, regardless of the alias in the URL, the system will find the product based on the id)
- enter an alias without special characters in the products

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

Time to create page: 0.062 seconds
Powered by Kunena Forum