Friday 22 January 2010 9:08:52 am - 4 replies
Heiner Wurbs
Sunday 24 January 2010 1:33:59 am
There are some options in the transform.ini.
BUT: I want to use the new URLs and only as a fallback the old ones. So I suppose, the urlalias_compat is not the right Groups in Transformation.
Or, if this is not possible, is there an extension or solution to manage these old urls? Because they are still in the database ...
Nicolas Pastorino
Monday 25 January 2010 10:09:45 am
Hi Heiner,
This is a good question, and i must confess i called on eZ Engineering's help on that. We'll come back to you when we have the answer!
Cheers,
-- Nicolas Pastorino Director Community - eZ Member of the Community Project Board eZ Publish Community on twitter: http://twitter.com/ezcommunity t : http://twitter.com/jeanvoye G+ : http://plus.tl/jeanvoye
Monday 25 January 2010 2:09:32 pm
Hi Nicolas,
that would be great! For now I made a hack of kernel/error/view.php:
I replaced the line "$errorRedirectURL = $errorINI->variable( 'ErrorSettings', 'DefaultRedirectURL' );" with the following:
$lost_uri = $_SERVER['REQUEST_URI']; if ( strlen( $lost_uri ) > 0 and $lost_uri[0] == '/' ) $lost_uri = substr( $lost_uri, 1 ); $db = eZDB::instance(); $sql = "select * from ezurlalias where "; $sql .= "source_url LIKE '". $lost_uri ."' "; $lost_uri_rows = $db->arrayQuery( $sql, array( 'offset' => 0, 'limit' => $limit ) ); if ( count( $lost_uri_rows ) > 0) { foreach ( $lost_uri_rows as $lost_uri_row ) { $errorRedirectURL = $lost_uri_row['destination_url']; } eZDebug::writeError( "Hack: Found lost URI: " . $_SERVER['REQUEST_URI'] , "error/view.php" ); } else { $errorRedirectURL = $errorINI->variable( 'ErrorSettings', 'DefaultRedirectURL' ); }
I suppose, that the solution could be in a transformation, but I dont understand it :(
Monday 25 January 2010 2:17:58 pm
append:
[SiteSettings] ErrorHandler=displayerror and in error.ini.append.php [ErrorSettings-kernel] # 20 - Module not found ErrorHandler[20]=redirect
You must be logged in to post messages in this topic!