Import gives errors. Need help.

Author Message

Marco Zinn

Friday 12 September 2003 1:48:08 pm

Hello everyone, especially Wenyue ;)

I'm trying again the import scripts to import data from 2.2 to 3.1 (or later 3.2).
I tried "importuser.php" first, but the problem is the same.
I did a cleandatabase with kernel_clean.sql. All necessary object classes and class attributes are in the (clean) database.

Debugging show me one warning and then fails with an error:
Warning: Invalid argument supplied for foreach() in [docroot]/kernel/classes/ezpersistentobject.php on line 552.
(caused by $contentObject =& $class->instantiate( $userID, 1 ); )

The fatal error is this:
Fatal error: Call to a member function on a non-object in [docroot]/importuser.php on line 125.
This is caused by $contentObjectAttributes[0]->setAttribute( 'data_text', $name );

Looks a lot, like the preceeding line ($contentObjectAttributes =& $version->contentObjectAttributes(); ) does not return the expected array of object attributes.

Why?
How can I debug this?
(The data from the ez2-tables in the DB are looking fine.)

What DB entries are needed for the import scripts to work?

I really need some help here, because I think, it's a silly small bug, but I cannot figure it out.

Marco
http://www.hyperroad-design.com

Marco Zinn

Wednesday 17 September 2003 9:49:10 am

Hi folks,

well I found out and solved one issue with the import scripts.
On an other system (Solaris), the import scripts did not work either (ezP 3.2 beta 2), but gave an error about not knowing the function ezi18n.

I could solve this and get the scripts running by inserting one line (in every script).
Insert this line:
include_once( "kernel/common/i18n.php" );
after the other include_once lines.

Unfortunatly, the above mentioned errors still are there on a Suse Linux setup (ezP 3.2 beta 2)

Marco
http://www.hyperroad-design.com

Marco Zinn

Sunday 28 September 2003 9:00:16 am

I solved the other import error now:
When you get an error complaining about something like "not beeing able to call a method of a non-existing object", you might have a setup, where the content is non-english.
As the import-scripts to not evaluate the override files, it read the content locale from the original site.ini, where it is "eng-DB". When your Database is mono-linugal (ie. German-only), the import fails.
Just edit the original settings/site.ini and change "ContentObjectLocale" to your locale (ie ger-DE).
Do NOT change the "Locale", but the "ContentObjectLocale"!

Marco
http://www.hyperroad-design.com

Kenneth Colwell

Friday 06 February 2004 2:10:48 pm

hi,

I'm attempting to import from 2.2.9 to 3.3-3.

When I run php -C importimage.php I get the following error message:

PHP Fatal error: Undefined class name 'ezimage' in /var/www/pub3/importimage.php on line 217
<br />
<b>Fatal error</b>: Undefined class name 'ezimage' in <b>/var/www/pub3/importimage.php</b> on line <b>217</b><br />

Does anyone have any suggestions?

Marco Zinn

Saturday 07 February 2004 2:37:37 am

Hi,
in 3.3, ezPublish uses a new image system. The import scripts were not written for this new image system, and i think, this results in the errors, that you mention.
ez 3.2 uses the old image system (just as 3.0 and 3.1)
So, i suggest, that you installed 3.2-4 (the latest 3.2 release) and import your data from 2.2.9 to 3.2-4.
This should work. Check, if your images are okay in 3.2
Then, make a backup of everything ;) and update from 3.2-4 to 3.3-3
Hope, this helps.

Marco
http://www.hyperroad-design.com

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