0

Our redirects aren't working anymore - properply after updating to Magento 1.9.3.1.

The rewrites are still present in the URL Rewrites. If I click on one of them and save it (without editing anything), then it works again.

Any ideas how to "re-apply" them, without manually saving each and everyone? (Reindexing does not fix the issue.


Example:

https://www.fyr-selv.dk/Briketter/SEDI-Toervebriketter/SEDI-Toervebriketter-k111-i46.html

URL rewrite

UPDATE:

Seem's to be 1.9.3.1 bug caused by changes to rewrites and case sensitivity. When i save a rewrite, then requestpath changes all uppercase characters to lowercase. This matches the fix description in Magento changelog regarding rewrites:

Case-sensitive variations of URL rewrites work as expected.

But seems like the update lacks to change this for all current rewrites.

Rewrites changes casing

2 Answers 2

0

SQL: UPDATE core_url_rewrite SET request_path = LOWER(request_path) fixes the issue.

This is caused by Magento 1.9.3.1 changes, making request_path entries that are not all lowercase invalid.

4
  • After re-indexed the configuration back to original, how can i solve this issue?
    – zus
    Commented Jan 19, 2018 at 12:20
  • What version are you using @zus? Commented Jan 24, 2018 at 19:15
  • Magento ver 1.9.2.3
    – zus
    Commented Jan 25, 2018 at 12:54
  • @zus this only applies to 1.9.3.1 and above. You need to update to Magento 1.9.3.1 or above first. Commented Feb 2, 2018 at 9:54
0

The bug comes from changements made in app/code/core/Mage/Core/Model/Resource/Url/Rewrite.php

$path = array($path);                          => $path = array(strtolower($path));
$pathBind['path' . $key] = $url;               => $pathBind['path' . $key] = strtolower($url);
$mapPenalty = array_flip(array_values($path)); => $mapPenalty = array_change_key_case(array_flip(array_values($path)));

The update request proposed by Michael Knudsen is probably the best solution.

Another solution is to complete the changements made in app/code/core/Mage/Core/Model/Resource/Url/Rewrite.php replacing also the 2 occurences of $item['request_path'] by strtolower($item['request_path'])

Best regards,
Olivier Blanc, Web Developper

Note: the same question has been asked here

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.