This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » General » Can't import ez4.0.1 package to ez4.1.x
expandshrink

Can't import ez4.0.1 package to ez4.1.x

Can't import ez4.0.1 package to ez4.1.x

Wednesday 22 July 2009 1:12:12 pm - 2 replies

Hi all,

today i try to import a simple contentclass package <b>my-classes-1.0_1.ezpkg</b> into ez4.1.x.

But it failed!

<i>"The package name my-classes is invalid, cannot import the package"</i>

What i did wrong?
I created the package with an ez4.0.1 installation and i used the packagename ez automatically had created.

After some debugging I found out that ez 4.1.x has a new nameconvention regarding packagenames.

In ez4.1.x the packagename can not include a '-' in package names and all characters has to be downcase! You can use all characters which you can use for class_identifiers.

The solution is. If you want to export classes from an ez version < 4.1.x into ez4.1.x you must set the packagename to e.g. <b>my_classes</b> not ( 'my-classes' or MyClasses ).

<b>Conclusion for export ez4.0.1 package into ez4.1.x:</b>

Use underlines '_' instead of '-' when createing packages in ez4.0.1

Wednesday 22 July 2009 1:19:06 pm

Great Tip Felix

Thanks,
Heath

Friday 14 May 2010 12:26:05 am

Thank you also Felix!

Possibly the most useful tip I have ever had the privilage to use!

Just to clarify, becuase it took me an hour or so of trial and error even using this technique:

  • It's not just the exported filename as I thought you meant
  • The top-level/parent node you wish to export from ez v4.0.x needs to be renamed via the admin GUI in lowercase and without hyphens before performing an export
  • Once the export is complete, hyphens in the filename itself that eZ puts in there for the version no. work A-OK.
  • As you may have read elsewhere, exporting the content as 'Main Node Only' is a red-herring. It made no difference to my export.

Scripts you might find helpful are:

  • ezpublish/ezpm.php to import large packages from the command-line
  • ezpublish/bin/php ezsubtreecopy.php - ideal when you wish to export some 'live' content, but need to rename it as lowercase and without hyphens before exporting - copy the subtree, rename it accordingly, then export.

Thanks again Felix happy.gif Emoticon
Russell

Modified on Friday 14 May 2010 12:27:57 am by Russell Michell

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from