Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problem involving SEF URLs, Rewrites and Duplicating Products in 0.6.13700
 
Zander
Jr. Member
 
Total Posts:  15
Joined:  2007-10-30
 

I filed a bug report the other day and the problem turned out to be with my setup and not Magento so this time I thought I better post this to the forum first and see if anyone else has the same problem…

To create a new product I go to:

Catalog -> Manage Products -> Add Product

When I browse the store and select the appropriate category then I see the product. It has a URL in the form:

http://domain.com/catalog/product/view/id/140/s/product-four/category/4/

Selecting the product takes me to this URL and the product page is displayed as expected.

I enter a SEF URL Identifier and this is stored as part of the product record but there are no records added to the core_url_rewrite database table.

I then create a second product by ”duplicating” the first.

For the duplicate, I change the product name, the SKU and the SEF URL and save it. Two records appear in the core_url_rewrite database table.

The first record in the core_url_rewrite table has an id_path of “product/141”, a request_path of “product-five.html” and a target path of “catalog/product/view/id/141”

The second record in the core_url_rewrite table has an id_path of “product/141/4”, a request_path of “/category-sef-url/product-five.html” and a target path of “catalog/product/view/id/141/category/4”

When I browse the store and select the appropriate category then I see the new duplicated product. It has a URL in the form:

http://domain.com//category-sef-url/product-five.html

Selecting the product takes me to this URL but instead of displaying the product page I get the “Whoops, our bad… The page you requested was not found...” page.

If I manually browse to http://domain.com/product-four.html (the original product) then I get the “Whoops, our bad… The page you requested was not found...” page. This is because Magento did not create any records in the core_url_rewrite table for this product.

If I manually browse to http://domain.com/product-five.html (the duplicate product) then I get the product page for that product.

So, there appears to be three issues:

[1] Creating a product does not create any records in the core_url_rewrite database table but duplicating a product does create records in the core_url_rewrite database table.

[2] When I browse to the appropriate category, I see both products however I can only select the “created” products and can not select the “duplicate” products. This is because the created products do not have core_url_rewrite records and I therefore get the none-SEF URL however the duplicate products have SEF URLs and as I am browsing to them from within a category I get the “Whoops, our bad… The page you requested was not found...” page.

If I clear the core_url_rewrite table then the catalogue uses the none-SEF-URL for both products and I can browse to the product page for both products from within a category.

[3] As noted in point [2], when browsing the catalogue and selecting a link to a SEF URL that contains a category (e.g. http://domain.com//category-sef-url/product-five.html) this form of URL does not work and I get the “Whoops, our bad… The page you requested was not found...”.

Sorry this is so long but I wanted to make sure I thoroughly documented this as best I could.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@Zander: thank you for such a detailed description of the isue, that definitely helps smile

We will try to reproduce and fix this problem.

Meanwhile, does it help to clear core_url_rewrite table and run System / Cache Management / Refresh Catalog Rewrites ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zander
Jr. Member
 
Total Posts:  15
Joined:  2007-10-30
 

@Moshe: As I noted above, if I clear the core_url_rewrite table then the catalogue uses the none-SEF-URL for both types of products (those created from scratch and those that were duplicates) and browsing to product pages from any other page in the site works fine.

I currently have caching turned off (while I test) so I do not have to manually refresh the cache for the above to work.

If you require any further confirmation or clarification during your testing then please do not hesitate to ask.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

"Refresh Catalog Rewrites” is temporary on “Cache Management” page. It is not dependant on other cache settings.

Could you try to set the checkbox, Save and retry the links?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zander
Jr. Member
 
Total Posts:  15
Joined:  2007-10-30
 

Very interesting… Selecting “Refresh Catalog Rewrites” did indeed have an effect. Thanks!

After refreshing catalog rewrites, I can browse successfully to all pages in the catalogue and I see that the core_url_rewrite database table now contains records for all products irrespective of whether the product was created from scratch or duplicated from another product.

This means that all issues I listed earlier are resolved by manually running “Refresh Catalog Rewrites”. Is this by design or will it be addressed in future releases of Magento?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michae1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 
Zander - 18 November 2007 05:46 PM

Is this by design or will it be addressed in future releases of Magento?

Hi Zander,

This issue is specific for upgrading from one of the previous preview versions to the latest one, that we’ve pointed it in the release notes.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Zander
Jr. Member
 
Total Posts:  15
Joined:  2007-10-30
 

@Michael: I am experiencing the documented issues after a clean install (not an upgrade).

For example, I have performed a clean install and I have refreshed the rewrite cache and yet when I create a new product its SEF URL is not used when I browse the catalogue. Then, if I once again manually refresh the rewrite cache, the catalogue starts using the product’s SEF URL.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michae1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

@Zander: Ok, thank you. We’ll fix it in the next releases.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bel_linux
Jr. Member
 
Total Posts:  11
Joined:  2012-02-01
 

Hi,

My magento site stop creating SEF URLs. I emptied core_url_rewrite table and reindexed URL rewrites. Now my core_url_rewrite table is empty all the time even I reindex URLs.

Could you help me deal with this issue ?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top