Forums / Developer / OO extension setup

OO extension setup

Author Message

Tony Wood

Tuesday 20 September 2005 4:03:23 am

Hi,

I am testing the OO beta 2 extension. All installs well and I get the admin interface showing export but I get empty odt documents.
The errors log shows

[ Sep 20 2005 11:59:40 ] [] Unsupported attribute for OO conversionezauthor
[ Sep 20 2005 11:59:40 ] [] Unsupported attribute for OO conversionezxmltext
[ Sep 20 2005 11:59:40 ] [] Unsupported attribute for OO conversionezxmltext
[ Sep 20 2005 11:59:40 ] [] Unsupported attribute for OO conversionezboolean
[ Sep 20 2005 11:59:40 ] [] Unsupported attribute for OO conversionezobjectrelation

I have the following in the oo.ini file.

[article]
Attribute[title]=title
Attribute[intro]=intro
Attribute[body]=body

[folder]
Attribute[title]=name
Attribute[shortdescription]=short_description

Am I missing anything here.

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Tony Wood

Tuesday 20 September 2005 5:31:23 am

I found the solution to this. No reply needed.

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Bård Farstad

Tuesday 20 September 2005 5:31:49 am

Tony,

the warnings you get can be ignored. That's my mistake ;)

I am suspecting that there is something wrong with zip on your system. The OASIS extension uses the zip command line to create the .odt document. The zip and unzip command line program needs to be installed and available for the apache user. You can also specify the path in oo.ini if needed.

There are currently some error checking missing, checking for zip is one of them.

--bård

Documentation: http://ez.no/doc

Bård Farstad

Tuesday 20 September 2005 5:32:26 am

OK, since I replied. Was it zip which was the problem?

--bård

Documentation: http://ez.no/doc

Tony Wood

Tuesday 20 September 2005 6:20:04 am

Interesting,

After testing I think the problem lies with the delivery. by removing
//eZDir::recursiveDelete( $this->OOExportDir );
//eZDir::recursiveDelete( $this->OOTemplateDir);
I can see that all the xml info is being created.

The problem is with the zip/chdir command in the file...

chdir( $this->OOExportDir ); just plain fails on a chroot environment (and appears to be the only time it has been used in eZP). So I hard coded for now.
Even with the hardcoded info the zip file is not being created.

I will keep digging, but would really prefer if you could use the zlib code rather than the exec zip command.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Gabriel Ambuehl

Tuesday 20 September 2005 6:40:51 am

AFAIK, zlib does gzip whereas zip does plain ZIP (as in the veneral pkzip).

But I agree, PHP should be able to do ZIP internally. Maybe someone got a PHP class to create ZIPs (will be fast, for sure ;) )

Visit http://triligon.org

Tony Wood

Tuesday 20 September 2005 6:42:25 am

Bard commented out some code.

        require_once('extension/oo/lib/pclzip.lib.php');
            $archive = new PclZip( $this->OORootDir . "ootest.odt" );
            eZDebug::writeError( "file " .$this->OORootDir . "ootest.odt");

            $archive->create( $this->OOExportDir,
                              PCLZIP_OPT_REMOVE_PATH, $this->OOExportDir );
        }

This works well for me :)

odt has a problem but at least I can get an .odt file :)

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

eZ debug

Timing: Jan 18 2025 19:27:41
Script start
Timing: Jan 18 2025 19:27:41
Module start 'content'
Timing: Jan 18 2025 19:27:41
Module end 'content'
Timing: Jan 18 2025 19:27:41
Script end

Main resources:

Total runtime0.0185 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 588.7266180.8438
Module start 'content' 0.00720.0053 769.5703101.9609
Module end 'content' 0.01240.0060 871.531378.7031
Script end 0.0184  950.2344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002211.6523120.0002
Check MTime0.00115.7048120.0001
Mysql Total
Database connection0.00084.337710.0008
Mysqli_queries0.003820.429640.0009
Looping result0.00000.152320.0000
Template Total0.005530.010.0055
Template load0.00095.019310.0009
Template processing0.004624.989310.0046
Override
Cache load0.00063.281710.0006
General
dbfile0.00042.1817100.0000
String conversion0.00000.025830.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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