2

this store is in Magento 2.3.0, and I'm running into an issue regarding url rewrites/keys.

On the product, I've set the url key as example-key, but only example-key-extra-stuff works -- that being the old url key. Even after deleting the whole url_rewrite table and regenerating rewrites (using https://github.com/olegkoval/magento2-regenerate_url_rewrites), the old URL key ends up in the rewrite table and the new URL key doesn't work.

Where do you think this old URL Key is being pulled from?

--

EDIT/UPDATE: I've found the old URL Key in the catalog_product_entity_varchar table, with the entity ID matching the product. The new URL key is there as well, also with its entity ID matching the product. The only difference is that the old URL Key (example-key-extra-stuff) is for attribute id 116 and the new one is for attribute id 115 (example-key).

I then checked the catalog_eav_attribute table and saw that these differences between these two attributes: 115 is visible, used in product listing, used in grid, and is filterable in grid, while 116 is not. I'm not sure where to find other information on these attributes, but it seems like one is being updated while the other (invisible one) is not, but then the invisible one is being used for the URL rewrites. Any thoughts on how to resolve this?

2
  • Is your indexer running correctly? Commented May 8, 2019 at 20:34
  • @MorganSmith Yeah, indexer seems to be running like normal.
    – brackfost
    Commented May 8, 2019 at 20:36

1 Answer 1

1

I would suggest you to truncate both database tables i.e. catalog_url_rewrite_product_category and url_rewrite.

Then try to regenerate the url rewrites using your installed module. Run indexer and flush the cache.

1
  • Good thought, thanks, but somehow that old URL key still shows up. Puzzling.
    – brackfost
    Commented May 9, 2019 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.