Content IDs & migration

Author Message

Kévin S.

Friday 23 July 2010 1:27:56 am

Hello !
I have exported some content and an extension from my local eZ Publish to another eZ Publish, and I met some issues :

- First, I could not import the extension package : when I clicked on "Import package" after choosing the file, eZ Publish did not react. Nothing.

- So I imported the extension manually, copying its folder.

- As a result, it worked, but it all the nodes ID in the destination eZ Publish had changed. So I had to update all the templates conditions based on node_id, and all fetches that used objects_id !
Is there a way to export or update an extension without having all node and object ids changed ? Do I need to export all the dev database to the prod server (for a big big database is can be very long !) ?
Thank you !
___
Kévin

Ivo Lukac

Friday 23 July 2010 2:33:40 am

There is no way to transfer object ids nor node ids from one ez database to another.

That's why is bad practice to have hard coded ids in the templates. At least create special your.ini with those ids in it and then reference them with ezini operator in your templates. So when you migrate content you only need to change one ini file.

Cheers

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Kévin S.

Friday 23 July 2010 2:41:46 am

And could'nt I use remote_ids instead of node ans objets IDs ?

André R.

Friday 23 July 2010 4:50:01 am

Yes, this is the best thing, so you don't need to maintain id list on install.
As of 4.1 there should be fetch function support and override support to use remote_id, so you can safely use that (but do note that some bugs surrounding it was fixed in 4.2 and 4.3, especially #15639)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 03:02:21
Script start
Timing: Jan 18 2025 03:02:21
Module start 'layout'
Timing: Jan 18 2025 03:02:21
Module start 'content'
Timing: Jan 18 2025 03:02:22
Module end 'content'
Timing: Jan 18 2025 03:02:22
Script end

Main resources:

Total runtime0.6900 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.8906152.6094
Module start 'layout' 0.00640.0040 740.500039.4141
Module start 'content' 0.01040.6781 779.9141594.2813
Module end 'content' 0.68850.0015 1,374.195312.1875
Script end 0.6900  1,386.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5013160.0002
Check MTime0.00150.2116160.0001
Mysql Total
Database connection0.00080.121210.0008
Mysqli_queries0.639292.6352620.0103
Looping result0.00060.0833600.0000
Template Total0.656395.120.3281
Template load0.00180.254320.0009
Template processing0.654594.858220.3273
Template load and register function0.00020.023910.0002
states
state_id_array0.00110.164910.0011
state_identifier_array0.00150.222320.0008
Override
Cache load0.00150.2133230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.102130.0002
Fetch class attribute name0.00100.144760.0002
XML
Image XML parsing0.00120.176630.0004
class_abstraction
Instantiating content class attribute0.00000.001560.0000
General
dbfile0.00090.1352240.0000
String conversion0.00000.001640.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs