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.