Share » Forums » Developer » What do these errors mean?

What do these errors mean?

What do these errors mean?

Monday 29 March 2004 5:58:41 am - 6 replies

Author Message

Dominik Pich

Tuesday 30 March 2004 12:21:57 am

How to propertly import images?
I found the above code here.

Alex Jones

Tuesday 30 March 2004 5:59:09 am

Which version of eZ publish are you using?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Dominik Pich

Wednesday 31 March 2004 12:52:06 am

Seite:
osiris/notencity/index.php

Version
3.3-2 (3.3)

SVN Revision
4764

Erweiterungen
sheet

PHP
4.3.3

Alex Jones

Wednesday 31 March 2004 6:15:09 am

The image system was changed with the release of 3.3. According to the New Image System article (http://ez.no/ez_publish/download/changelogs/ez_publish_3_3/new_image_system), the way to import images is different. Instead of the large block of code required previously, you can now import with:

<b>PHP interface</b>
The interface to the image datatype and image system has been modified, this means that import script or other PHP code that used the old eZImage and eZImageVariation directly will need to change the code.
While this sounds bad it is actually quite easier to work with the new image system, instead of copying the images and creating references yourself you may now simply pass the image file path to a function in eZImageAliasHandler.

Example:

$content =& $attribute->content();
// $content is now an instance of eZImageAliasHandler
if ( is_object( $content ) )
{
    $content->initializeFromFile( $imageFile );
    if ( $content->isStorageRequired() )
    {
        $content->store();
    }
}

I ran into some problems with my import, and with the help of Wenyue, got it working again. I would highly recommend you upgrade to 3.3-4 and try using the above code. If, you cannot upgrade, or if you upgrade and it still doesn't work, post here and I can post the changes we made to the <i>ezimagealiashandler</i> kernal code. But hopefully, they solved those issues in 3.3-4.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Dominik Pich

Monday 05 April 2004 5:35:06 am

After upgrading as you proposed, no errors are outputted anymore even though I did not change the code...
Thanks :)

Alex Jones

Monday 05 April 2004 6:44:51 am

Glad to hear it. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu