Node's Url alias creation error

Author Message

H-Works Agency

Monday 30 May 2011 8:32:42 am

Hello everyone,

I experienced that when you have a tree with multiple import cronjobs that do a lot of edit/delete/create you end up with a lot of node missing their "url_alias".

I know my report isn't very precise but has someone already experienced this problem ?

Is there a special command to execute after for example createAndPublish or updateAndPublish to prevent ending with /content/view/full/28348 url's ?

I know that bin/php/updateniceurl.php can do the job but what could be the cause of those missing aliases ?

Thanx in advance.

EZP is Great

Nicolas Pastorino

Tuesday 31 May 2011 12:43:02 am

Hi Martin, 

I'd say re-publishing the content should do the deal (eg : execute the 'content' 'publish' operation anew, from PHP). Might need to be trimmed in case of large volumes. DelayedIndexing has to be enabled, at least in memory only.

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

Marko Žmak

Tuesday 31 May 2011 1:55:32 am

Maybe using something like this:

                $operationResult = eZOperationHandler::execute(
                        'content', 'publish',
                        array(
                                'object_id' => $object->attribute( 'id' ),
                                'version' => $version->attribute( 'version' )
                        )
                );

in the import script would do the trick?

I used it in many import scripts and never had problems with url aliases.

P.S. For faster imports look at the discussion in this forum thread:

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

H-Works Agency

Tuesday 31 May 2011 2:12:42 am

Uhm thank you, i'll replace my createAndPublish with the execute method on content publish to see what happens.

EZP is Great

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:12:06
Script start
Timing: Jan 18 2025 02:12:06
Module start 'layout'
Timing: Jan 18 2025 02:12:06
Module start 'content'
Timing: Jan 18 2025 02:12:07
Module end 'content'
Timing: Jan 18 2025 02:12:07
Script end

Main resources:

Total runtime1.2704 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0469152.6250
Module start 'layout' 0.00550.0032 741.671939.4531
Module start 'content' 0.00871.2601 781.1250605.6016
Module end 'content' 1.26880.0015 1,386.726612.1641
Script end 1.2703  1,398.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.2971160.0002
Check MTime0.00140.1094160.0001
Mysql Total
Database connection0.00070.053910.0007
Mysqli_queries1.208895.1501630.0192
Looping result0.00060.0502610.0000
Template Total1.229996.820.6150
Template load0.00210.166120.0011
Template processing1.227896.647820.6139
Template load and register function0.00010.009110.0001
states
state_id_array0.00250.198210.0025
state_identifier_array0.00210.162420.0010
Override
Cache load0.00190.1509280.0001
Sytem overhead
Fetch class attribute can translate value0.00090.070630.0003
Fetch class attribute name0.00180.139270.0003
XML
Image XML parsing0.00150.121530.0005
class_abstraction
Instantiating content class attribute0.00000.001380.0000
General
dbfile0.00250.1979310.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs