Wednesday 28 February 2007 8:33:04 am
I believe I have found a solution that requires a slight kernel hack. Now, I can define a system URL forward rule for /foo to go to /foo/(bar)/foobar, /foo/(foobar)/bar, etc. To do this, I modified kernel/classes/ezurlalias.php, starting line 812, eZURLAlias::translate() from
if ( get_class( $uri ) == "ezuri" )
{
$uri->setURIString( $uriString, false );
}
to
if ( get_class( $uri ) == "ezuri" )
{
$uri->setURIString( $uriString); //, false );
}
I have run through my site and have not seen any issues caused by this change. Existing URL translations continue to work, and non-translated URLs continue to work. However, any change deep in the kernel bowels gives me pause. I'm hoping an official eZ rep/developer will see this and comment on if this has any repercussions for the overall system (or why you would want to not have full initialization going on in setURIString at this point). EDIT: It does affect the system; if I type /foo/(bar)/foobar directly into my browser, the user parameters are not passed in. So, this definitely breaks something, but I don't know why. Back to the drawing board...
|