Saturday 12 April 2008 12:01:30 am
Spent an evening debugging this stuff and here's the result with a preliminary fix which Works For Me (TM). Someone from the eZ crew should look into my fix, because it may be too simplistic or even plain wrong for general use.
Anyway, here are my findings:
File #1 /index.php:
a) The code does run into the if clause of below the comment "Check for URL translation". It does fill $translateResult correctly and sets $objectHasMovedError to true as expected
b) On line around #702 it calls: $module->handleError( eZError::KERNEL_MOVED, 'kernel', array( 'new_location' => $objectHasMovedURI ) );
The $module seems to be error-module, so that leads us to file #2 kernel/error/view.php:
a) $errorHandlerType is set to 'redirect' here b) Thus it enters the if-clause at around line #105 where it redirects to the 'ErrorSettings' => 'DefaultRedirectURL' !!! Which is of course non-sense, as we have been given a NEW LOCATION and should not use the DefaultRedirectURL from the INI settings Instead of entering the if-clause at line #105 I made it enter the if-clause above at #78 which does issue a HTTP 301 (moved permanently). I realize that a HTTP code is probably not what was intended for the url_alias scenario, but it does the job for now until this gets eZ's attention. Patch is attached to the issue linked in my previous post.
|