duanbu1421 2016-02-26 07:40
浏览 55

输入新产品后,Magento 1.9.0.1:$ product-> getProductUrl出错404

I have an existing Magento project and it has a strange problem:

After entering a new product in magento backend, the url_key direct link does not work. An example: I created a new product called "some testarticle". The field url_key in the backend is then filled with "some-testarticle". When I try calling www.domain.com/some-testarticle.html I get a 404 error. On my category page the link to this specific product looks something like this:

www.domain.com/catalog/product/view/id/12345/s/some-testarticle.html 

Only after a while (don't know how long it takes or what needs to happen), the short link will work and domain.com/some-testarticle.html will work.

Do you guys know what this is? Is there some magento cronjob that works its magic or how and when are the short urls generated?

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • duanjiao5261 2016-02-27 09:43
    关注

    It might be that you need to reindex after adding the new products,

    • Catalog URL Rewrites
    • Category Products

    This can be done in the admin panel,

    System -> Index Management

    Or by command line in /magento_root/shell

    php indexer.php --reindex catalog_url
    php indexer.php --reindex catalog_category_product
    
    评论

报告相同问题?