[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.

eZ debug

Timing: Jan 31 2025 04:23:17
Script start
Timing: Jan 31 2025 04:23:17
Module start 'layout'
Timing: Jan 31 2025 04:23:17
Module start 'content'
Timing: Jan 31 2025 04:23:17
Module end 'content'
Timing: Jan 31 2025 04:23:17
Script end

Main resources:

Total runtime0.0117 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.2656151.2266
Module start 'layout' 0.00470.0022 739.492236.6797
Module start 'content' 0.00690.0035 776.171990.3125
Module end 'content' 0.01050.0012 866.484433.9922
Script end 0.0117  900.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002218.4930140.0002
Check MTime0.00108.6034140.0001
Mysql Total
Database connection0.00076.136510.0007
Mysqli_queries0.002218.568330.0007
Looping result0.00000.085510.0000
Template Total0.00098.010.0009
Template load0.00086.478510.0008
Template processing0.00021.485810.0002
Override
Cache load0.00054.516410.0005
General
dbfile0.00032.261380.0000
String conversion0.00000.061140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs