Forums / Install & configuration / eZ upgrade - urlalias

eZ upgrade - urlalias

Author Message

Heiner Wurbs

Friday 22 January 2010 9:08:52 am

Hello community,

I have a question concerning upgrading and url_alias: the upgrade from 3.9.3 to 4.2 works fine and at the end I have the glorious new URLs, but the old urls are not working any more. Example:

"/company/about" is now "/Company/About"

If I enter the old one "/company/about", the content is displayed, even it is the old url.

But if the example looks like:

"/company/where_we_are" is now "/Company/About/Where-we-are"

the Module not found page is displayed.

Any hints or ideas?

Heiner

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

Heiner Wurbs

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 :(

Heiner Wurbs

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

eZ debug

Timing: Jan 18 2025 03:01:02
Script start
Timing: Jan 18 2025 03:01:02
Module start 'content'
Timing: Jan 18 2025 03:01:02
Module end 'content'
Timing: Jan 18 2025 03:01:03
Script end

Main resources:

Total runtime0.8064 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 587.7109180.8359
Module start 'content' 0.00620.6699 768.5469562.5938
Module end 'content' 0.67610.1303 1,331.1406337.4063
Script end 0.8064  1,668.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00490.6120210.0002
Check MTime0.00220.2765210.0001
Mysql Total
Database connection0.00090.110210.0009
Mysqli_queries0.731490.69542000.0037
Looping result0.00210.25711980.0000
Template Total0.773996.020.3869
Template load0.00260.323720.0013
Template processing0.771295.633720.3856
Template load and register function0.00020.025410.0002
states
state_id_array0.00130.163710.0013
state_identifier_array0.00130.164120.0007
Override
Cache load0.00220.2741300.0001
Sytem overhead
Fetch class attribute can translate value0.00220.278830.0007
Fetch class attribute name0.00130.157660.0002
XML
Image XML parsing0.00080.095530.0003
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00400.4898270.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs