3

All the links on my Magento 1.14.2 site are showing up as (literally):

".../catalog/product/view/id/1234/s/my-really-cool-product" instead of ".../my-really-cool-product"

Reindexing seems to build the rewrites in the database, but they don't seem to be acted upon at all. When traffic comes in to the site from ".../my-really-cool-product" it results in a page not found error.

I copied the files of the site to another directory and am using an older version of the database, and the issue does not seem to be replicated, so I'm thinking that the problem lies somewhere in the database, but I haven't been able to find it yet.

Any ideas what might be going on here and how to fix it?

1

Go to the catalog >> url rewrite and check your SEO friendly url is generated or not. After that check goes to system >> index management and check url rewrite index is in the ready mode not red.

If it is showing red then open ssh and go to the shell folder which is in the magento root directory. Then run below command:

shell>  php indexer.php --reindexall

Remove cache folder rm -rf var/cache Hope this helps you !!!

  • Thank you, @Saurabh, but I've checked these things and they are as they should be. – Greg Nickoloff Aug 3 '18 at 1:53
0

For Magento 2 run below command in Magento root:

php bin/magento indexer:info

By above command you will know the name and code of each indexer. After that you can execute below command to reindex one or all the indexer:

php bin/magento indexer:reindex <indexer_code>
php bin/magento indexer:reindex 

Dont forget flushing the cache. Thanks in advance.

  • Yes, Its work for magento 2 other indexing but url_rewrite will not work in magento2. – Saurabh Dwivedi Aug 11 '18 at 19:11
  • This is not relevant. The original question was pertaining to Magento 1.14, not Magento 2. – Greg Nickoloff Aug 13 '18 at 19:44
0

Although I'm still not sure what caused the rewrites to initially stop working and to stop displaying as the front end product links, I was able to restore the rewrites/redirects and the displayed product links by truncating the enterprise_url_rewrite table in the Magento database.

I used this query:

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `enterprise_url_rewrite`;
SET FOREIGN_KEY_CHECKS = 1;

And subsequently, things started working again as expected.

I had tried this early on after running into this problem, so I'm not sure why doing it a second time a couple of weeks afterwards had the desired effect when truncating the table at the beginning did not, but, in any case, that's what I did to fix it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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