Forums / Developer / Problem with OO-Extension

Problem with OO-Extension

Author Message

Thorsten Körner

Wednesday 23 March 2005 12:41:27 pm

Hi there,

I'm trying to get the oo-extension running.
Nearly everything works but importing an oo-document, which contains characters like german "umlauts" does not work.

To test this, I created a file with differend styles like headers, ordered and unordered Lists and with four pictures.

The file was imported correctly, but if I change a single character to a german "umlaut" like 'ö', the file will not appear in place.
Only a headline is there and no text. The images are stored correctly in var/news/storage/images/media/imported_images/<file_name> but are not shown on the website.
The Problem is the same with the current beta, and with the files, I got from http://zev.ez.no/svn/extensions/oo/trunk/ this morning.

Has anyone an idea, any hints?

CU
Thorsten

http://Server4Profis.de CMS, Database and eZ publish Hosting
http://123tk.de Database-, Internet and Intranet Development
eZ publish programing, extensions and modules
SAP, Lotus and IFS integration

Bård Farstad

Wednesday 23 March 2005 2:28:39 pm

Hi Thorsten,

the latest version in the svn repository should have fixed this issue. It now has proper character support. Could you try to add the characters æøå to a document and import them? They should appear fine with the newest version, without it they are not present.

--bård

Documentation: http://ez.no/doc

Thorsten Körner

Wednesday 23 March 2005 4:31:20 pm

Hi Bård,

I tried the files from http://zev.ez.no/svn/extensions/oo/trunk/ and they didn't work properly with 'ä,ö,ü ...',

I also found a small error in file ezooimport.php / line 459. There you'll find "<br/". But fixing this to "<br/>" was not the solution of my problem.

Thorsten

http://Server4Profis.de CMS, Database and eZ publish Hosting
http://123tk.de Database-, Internet and Intranet Development
eZ publish programing, extensions and modules
SAP, Lotus and IFS integration

Ekkehard Dörre

Thursday 24 March 2005 1:44:57 am

æøå works, äöüß not. Where I can find the conversion?

oo.sxw ist UTF-8, database iso-8859-1

error.log :

SET contentclassattribute_id='121', attribute_original_id='0',
    sort_key_int='0', sort_key_string='', data_type_string='ezxmltext',
    data_text='<?xml version=\'1.0\' encoding=\'iso-8859-1\' ?><section xmlns:image=\'http://ez.no/namespaces/ezpublish3/image/\'   xmlns:xhtml=\'http://ez.no/namespaces/ezpublish3/xhtml/\'><section><header>Gfhjztfhkgfhfhfhkgfhkfh</header>
<paragraph>æøå ä</paragraph>
<paragraph>huhu</paragraph>
</section></section>', data_int='1045487555', data_float='0'
WHERE  id='1238' AND contentobject_id='292' AND version='1' AND language_code='eng-GB' ERROR:  invalid byte sequence for encoding "UNICODE": 0xe43c2f

2. Is there any way to make a UTF-16 to UTF-8 conversion in ez ?

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Thursday 24 March 2005 3:11:53 am

O.K. on local systems, it works with Mysql, on server with postgres not. We try a new setup on server with mysql.

I found the converter:
lib/ezi18n/classes/eztextcodec.php
mbstring can do this, with some coding.

UTF-16 is for MS Word conversion via modified oo extension.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Thursday 24 March 2005 4:43:56 am

Hi Thorsten,

test: openoffice document 2,5 MB 80 pages:

Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 4760 bytes) in /srv/www/htdocs/web12/html/huhu/lib/ezi18n/classes/ezchartransform.php on line 302
Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Thursday 24 March 2005 7:28:17 am

Hi Thorsten,

.sxw with 16000 short words works with memory_limit= 96mb, 24000 not, this is only 10kb and content.xml is only 6kb

copy by hand into admin (article) 24000 are possible, 32000 not.

It is perhaps about this:
http://ez.no/community/bugs/weird_search_limitations_binary_file
Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Ekkehard Dörre

Saturday 26 March 2005 1:54:19 am

For long texts and documents there should be a splitting. After e.g. a header=1

<text:h text:style-name="Heading 1" text:level="1">huhu</text:h>

a new article is used with

'sort_field' => 8,
'sort_order' => 1,
'priority' => $my_sort_numbers,

Use these controls to set the sorting method for the sub items of the current location in kernel/classes/ezcontentobjecttreenode.php

 /*!
     \return the field name for the sort order number \a $sortOrder.
             Gives a warning if the number is unknown and return \c 'path'.
    */
    function sortFieldName( $sortOrder )
    {
        switch ( $sortOrder )
        {
            default:
                eZDebug::writeWarning( 'Unknown sort order: ' . $sortOrder, 'eZContentObjectTreeNode::sortFieldName' );
            case 1:
                return 'path';
            case 2:
                return 'published';
            case 3:
                return 'modified';
            case 4:
                return 'section';
            case 5:
                return 'depth';
            case 6:
                return 'class_identifier';
            case 7:
                return 'class_name';
            case 8:
                return 'priority';
            case 9:
                return 'name';
            case 10:
                return 'modified_subnode';
        }
    }

and

 /*!
     \return the field name for the sort order number \a $sortOrder.
             Gives a warning if the number is unknown and return \c 'path'.
    */
    function sortFieldID( $sortFieldName )
    {
        switch ( $sortFieldName )
        {
            default:
                eZDebug::writeWarning( 'Unknown sort order: ' . $sortFieldName, 'eZContentObjectTreeNode::sortFieldID()' );
            case 'path':
                return 1;
            case 'published':
                return 2;
            case 'modified':
                return 3;
            case 'section':
                return 4;
            case 'depth':
                return 5;
            case 'class_identifier':
                return 6;
            case 'class_name':
                return 7;
            case 'priority':
                return 8;
            case 'name':
                return 9;
            case 'modified_subnode':
                return 10;
        }
    }

'sort_order' => 1, is Ascending
'sort_order' => 0, is Descending

$my_sort_numbers is important for sorting the pages, so first page is the first, second ...

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing