[4.0] eZ cli lorem ipsum data creation script

Author Message

Sébastien Antoniotti

Sunday 11 May 2008 1:46:11 pm

Hi !

I'm looking for a way to run the eZ cli lorem ipsum data creation script (http://ezpedia.org/wiki/fr/ez/snippet_ez_cli_lorem_ipsum_data_creation_script_unstable) into an eZ Publish 4.0.

The first thing I've done was to add

require 'autoload.php';
 

in top of the script.

After, I encouter an error (Fatal error: Call to a member function setAttribute() on a non-object) on

$newNode->setAttribute( 'contentobject_version', 1 ); 

I think it was because $newNode was not set, so I replaced the line with $node->addChild by this :

// $newNode =& $node->addChild( $objectID, 0, true ); 
$newNode = eZContentObjectTreeNode::addChildTo($objectID, $nodeID, true, 1 );

So now, I do not encouter errors, but objects are not created...

Have you any piece of code who can help me ? I know that there is the api documentation but functions descriptions are very light !

Thanks in advance !

eZ Publish Freelance
web : http://www.webaxis.fr

Steven E. Bailey

Sunday 11 May 2008 11:33:09 pm

It's because of the: =&
change that to: =
In the original code.

You'll probably have to change all of them in the file(s).

But, there probably will be other problems too, also, you don't need to include the autoload.php file either, you just have to run it once.

I don't know the specific extension but I've converted a few other ones.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Sébastien Antoniotti

Monday 12 May 2008 1:28:31 am

Thanks, I'll try again.

eZ Publish Freelance
web : http://www.webaxis.fr

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