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