Hikashop Canonical url for deleted aliases

  • Posts: 28
  • Thank you received: 0
9 years 1 month ago #214162

Dear developers,

You need a button somewhere, or a mass action, that checks if a products canonical url is correct. If you delete an alias (menu, module, etc.) that is used in a canonical url, the resulting canonical url leads to a 404.

I changed a bunch of alias on the backend for various modules. This resulted in a bunch of products leading to 404. When I checked the database __hikashop_product, under the column product_canonical, I was greeted to a huge mess of old/non-existing canonical urls from way back when I was first testing hikashop, doh. I updated the table and set all product's canonical urls' to blank.

Perhaps when you update a alias (delete/modify), you check all products canonical urls and update them if needed. (ie. delete = set canonical url to blank; modify = set canonical url to new alias). Also a button would be nice, or a mass action as said above that can regularly check if canonical urls are correct / aliases used in a canonical url is available.

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

  • Posts: 82721
  • Thank you received: 13338
  • MODERATOR
9 years 1 month ago #214176

Hi,

Thank you for your input.
Checking if a canonical URL is correct or not with a button is not really possible as it's impossible to generate all the possible URLs of a product page, and sometimes, you want to configure a canonical URL that isn't one of the generated ones.
HikaShop doesn't generate the canonical URLs unless you tell it to. So if you fill the canonical URL with a wrong URL it's your responsability. Best is to leave that field empty unless you know what you're doing.
And if you want to clear all the canonical URLs in a go, it's possible with a mass action with an action "update the values" on the "product_canonical" column.
There are probably things we could improve with the current situation in order to make the system more foolproof, but it's not easy to have a one size fit all check on that. Otherwise, we wouldn't need a canonical URL field at all if we could guess what the canonical URL should be :)

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

  • Posts: 2639
  • Thank you received: 66
  • Hikashop Business
9 years 1 month ago #214196

I do that job directly with MySQL
1) I create the alias
2) I create canonical from alias

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

Time to create page: 0.076 seconds
Powered by Kunena Forum