Trying to import a package containing a site hierarchy

Author Message

Seth Gottlieb

Thursday 27 August 2009 11:40:53 am

Hello,

I am trying to use the package import/export functionality to take a hierarchy of folder nodes from one eZ Publish instance to another. I am also planning on using packages as a way to share content class definitions across different eZ Publish environments (developer environments, qa, and production).

I created the package using the "Content object export" wizard.

When I try to import this package, I get what looks like nameless items that represent the objects that I was trying to import. See screen shot: http://skitch.com/sggottlieb/bh6uf/ez-publish-website-interface

Can anyone tell me what I am doing wrong here?

Thanks,

Seth

André R.

Friday 28 August 2009 5:51:21 am

A bit difficult to pinpoint, but lets try ;)

Both exporter and importer are recent eZ Publish versions?
How man nodes do you try to move at the same time?
Do you get any timeouts? Or errors?
If you edit one of then (click the white icon in Name column to use menu), is all the data there?
And if you publish it, does it fix the name?

Also check the imported class, what is the name pattern there? Is it correct?

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

Seth Gottlieb

Friday 28 August 2009 7:07:41 am

Hi Andre,

Thanks for getting back to me. Here are the answers to your questions...

<b>Both exporter and importer are recent eZ Publish versions?</b>
Both are 4.1.3. The first time we tried this, the export and import were separate instances. The second time, it was on the same instance (after deleting out the tree).

<b>How man nodes do you try to move at the same time?</b>
19. They were all Folder objects except for a couple of links and a front page (standard eZ classes).

<b>Do you get any timeouts? Or errors?</b>
No problems through the UI.

<b>If you edit one of then (click the white icon in Name column to use menu), is all the data there?</b>
Yes. One thing I did notice, is that when I edit the object, I get an intermediate page that looks like this: http://skitch.com/sggottlieb/b7nnp/edit-content-website-interface

<b>And if you publish it, does it fix the name?</b>
No.

Any ideas?

Thanks,

Seth

Abdelkader RHOUATI

Friday 28 August 2009 9:04:04 am

Hi,

Try to verify that the content classes were imported succifully (the attribute object name pattern).

tks

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Seth Gottlieb

Friday 28 August 2009 10:18:20 am

I didn't create any new classes. What should I choose between the options: Replace existing class, Skip installing this class, Keep existing and create a new one?

Seth Gottlieb

Friday 28 August 2009 10:46:49 am

I may have figured out what is going on. It seems that this feature is designed to import <i>objects</i> and not <i>nodes</i>. Those blank items that I see are just nodeless objects. What tipped me off to this theory was this page:

http://skitch.com/sggottlieb/b7ddh/install-packages-website-interface

If is this the case with packages, is there any other way to export/import a node hierarchy?

Thanks,

Seth

Heath

Friday 28 August 2009 3:16:57 pm

Hey Seth,

I have encountered this exact problem in the past. An expert developer can solve this problem. I'm certain almost without question or hesitation. Don't give up your really not that far from a solution.

Unfortunately it was over two years ago and I no longer have ready access to the past solution. Here is a partial reference which might help you better understand the areas of the kernel I was required to patch at the time. [1]

What I can tell you briefly in the limited time I have tonight is the following.

You are experiencing a package import breakdown associated (loosely/presently/as described) with the content object tree node names not being correctly imported (at least if not other additional secondary issues with the imported content). We all know this because you have shared so well the details of your breakdown.

What I don't know that I am curious to ask is the following trouble shooting tips I've learned to validate package exported contents and trace the exact error(s) occurring within the kernel (during package export or import as of yet undetermined).

- First uncompress the exported package (ezpkg file) and validate the exported content object tree nodes exported xml content files.

-- These are tar.gz packages renamed as .ezpkg any copy of GNU tar + GNU gzip can help you decompress these packages. re: http://ezpedia.org/en/ez/package

-- Review the xml files to confirm that the name field is populated with text content or if the content is missing within the exported xml content files. This step is key because if you can isolate that the content either is not being exported or is being exported correctly (in my case i had to fix code in the kernel related to export).

-- (optional) I also took the extra step of validating (partial/all) xml within xml files contained within the packages say by content class of the exported content objects using a web service (I remember this step been somehow more complicated for some reason and only doing the minimum required to better understand my at the time unknown problems) http://www.google.com/search?q=xml+validator

-- Once you know the failure is before or after export you can turn on all php error reporting, display errors and xdebug and repeat the failing step (import / export) and trace your error through the kernel to the specific class which is responsible for failing to export (or import) the name fields of the content object tree nodes.

I was able to in -less than a day- export about 50 custom classes and untold numbers of content tree nodes between my local dev installation into our customers public beta installation, find / fix all kernel errors / bugs related to the import / export problems, build and submit patches to lists.ez.no public-sdk [1] and successfully import newly created and complete pacakges as needed without the past problems.

Your results depend on experience as always. YMMV

I hope this description truly helps you reach your goals.

Best wishes,
Heath

[0] http://ezpedia.org/en/ez/package
[1] http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=ihp&q=site%3Alists.ez.no+Brookins+Patch&aq=f&oq=&aqi=

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Seth Gottlieb

Saturday 29 August 2009 6:37:12 am

Thanks Heath! I will try this out first thing Monday.

Seth Gottlieb

Tuesday 01 September 2009 4:23:15 am

Hi Heath,

I followed the diagnostic procedures you recommended. Here is what I found:

The names of the objects are coming through. contentobjects.xml has elements like this:

<ezremote:object xmlns:ezremote="http://ez.no/ezobject" xmlns:ezobject="http://ez.no/object/" ezremote:id="60" name="_nav_links" ezremote:section_id="1" ezremote:owner_id="14" ezremote:class_id="1" ezremote:published="Tue, 25 Aug 2009 18:43:51 GMT" ezremote:modified="Tue, 25 Aug 2009 19:55:57 GMT" remote_id="930726b3b2f61be61dc6f4a7d029caf1" class_remote_id="a3d405b81be900468eb153d774f4f0d2" ezremote:class_identifier="folder" ezremote:always_available="1" initial_language="eng-US">
<ezobject:version-list xmlns:ezobject="http://ez.no/object/" active_version="2">
<ezobject:version xmlns:ezremote="http://ez.no/ezobject" ezremote:version="2" ezremote:status="1" ezremote:created="Tue, 25 Aug 2009 19:55:48 GMT" ezremote:modified="Tue, 25 Aug 2009 19:55:56 GMT" initial_language="eng-US">
<ezobject:object-translation language="eng-US" object_name="_nav_links">
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="230" ezremote:identifier="name" name="Name" type="ezstring">
<text>Navigation Links</text>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="231" ezremote:identifier="short_name" name="Short name" type="ezstring">
<text>_nav_links</text>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="232" ezremote:identifier="short_description" name="Short description" type="ezxmltext">
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"/>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="233" ezremote:identifier="description" name="Description" type="ezxmltext">
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"/>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="234" ezremote:identifier="show_children" name="Show children" type="ezboolean">
<value>1</value>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="235" ezremote:identifier="tags" name="Tags" type="ezkeyword">
<keyword-string></keyword-string>
</ezobject:attribute>
<ezobject:attribute xmlns:ezremote="http://ez.no/ezobject" ezremote:id="236" ezremote:identifier="publish_date" name="Publish date" type="ezdatetime"/>
</ezobject:object-translation>
<ezobject:node-assignment-list>
<node-assignment is-main-node="1" name="_nav_links" node-id="62" remote-id="495869b7c934c775225c4946f6a1ab1f" sort-field="path" sort-order="1" priority="0"/>
</ezobject:node-assignment-list>
</ezobject:version>
</ezobject:version-list>
</ezremote:object>

The only errors that I am seeing are in the Apache error log here they are:

[Tue Sep 01 07:17:42 2009] [error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/slp/ezwebin_site_admin, referer: http://slp.local/index.php/ezwebin_site_admin/package/install
[Tue Sep 01 07:17:44 2009] [error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/slp/ezwebin_site_admin, referer: http://slp.local/index.php/ezwebin_site_admin/package/install
[Tue Sep 01 07:17:55 2009] [error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/slp/ezwebin_site_admin, referer: http://slp.local/index.php/ezwebin_site_admin/package/install
[Tue Sep 01 07:17:58 2009] [error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/slp/ezwebin_site_admin, referer: http://slp.local/index.php/ezwebin_site_admin/package/view/full/nav_links_home_shop_help_subscribe_advertise_contact_articles_nav_links_home_shop_help_subscribe_advertise_contact_articles

Heath

Tuesday 01 September 2009 8:42:07 pm

Hello Seth,

I'm pleased you were able to confirm the attributes being exported correctly. Seems like the next step would be to trace the missing attribute value down in the package import process and study the php for related failures (while attempting to import (through this php during review (at least once))).

You prolly could do this a lot of different ways. By hand with a shell, text editor and time. xdebug + kcachegrind/webcachegrind (faster profiling evaluation). These tools combined are great aids in seeking out answers with php.

And I still think it might be a good idea to review your httpd.conf and vhost conf to address the httpd access errors you seem to be triggering (at some point ...). They don't seem be involved but they should not occur either. This involves properly setting your directory allow / deny settings.

# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Library/WebServer/Documents">
# Controls who can get stuff from this server.
    Order allow,deny
    Allow from all
</Directory>

We think an accurate, complete verbosly configured virtual host configuration is the basis of -any- ezpublish installation. Heh as the old man always used to rant at me. "We mod_rewrite in this family long before we will ever htaccess ...".

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Seth Gottlieb

Wednesday 02 September 2009 9:56:22 am

I spent the morning debugging with no success. After repeated attempts at importing the package, the functionality seems to have been improved from non-functional to really really flakey. Sometimes I can get it to work by multiple imports and mapping to different siteaccesses. It doesn't work consistently enough for me to see a pattern.

As far as I can tell, the issue may be with the folder object. I cannot get it to use the existing folder class.

Łukasz Serwatka

Thursday 03 September 2009 12:30:55 am

Hi,

When you created that package, did you choose option to export all node locations? There is a problem with packages system where those export won't work. So you have to export only main_node locations.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Seth Gottlieb

Thursday 03 September 2009 5:27:45 am

Ahh. I bet that is it. Thanks!

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