Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22521

ezcsvimport throws a warning if an ezimage is empty

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • QA tracked issues
    • 5.1, 5.2, 5.3-dev
    • Legacy stack, Misc
    • None
    • Rhel 6.4
      PHP 5.3.3

    Description

      Hi,
      – I create a simple article, without any image. Then I exported it:.

      php bin/php/ezcsvexport.php --storage-dir=./tmp 62 -s ezdemo_site -l admin -p publish
      

      – Then I tried to import it to a different folder:

      php bin/php/ezcsvimport.php --class=article --creator=14 --storage-dir=./tmp -l admin -p publish  101 tmp/article.csv
      

      – After the above command, i have the following warnings:

      Going to import objects of class article under node 101 from file tmp/article.csv
      
      PHP Warning:  getimagesize(var/ezdemo_site/storage/images-versioned/561/1-eng-GB/paulo1.): failed to open stream: No such file or directory in /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 1263
      PHP Stack trace:
      PHP   1. {main}() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:0
      PHP   2. eZContentObjectAttribute->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:122
      PHP   3. eZImageType->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/ezcontentobjectattribute.php:1159
      PHP   4. eZImageAliasHandler->initializeFromFile() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagetype.php:622
      PHP   5. eZImageAliasHandler->initialize() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:1212
      PHP   6. getimagesize() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:1263
      PHP Notice:  Undefined index: mime_type in /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 932
      PHP Stack trace:
      PHP   1. {main}() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:0
      PHP   2. eZContentObjectAttribute->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:122
      PHP   3. eZImageType->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/ezcontentobjectattribute.php:1159
      PHP   4. eZImageAliasHandler->setAttribute() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagetype.php:623
      PHP   5. eZImageAliasHandler->recreateDOMTree() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:146
      PHP Notice:  Undefined index: width in /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 933
      PHP Stack trace:
      PHP   1. {main}() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:0
      PHP   2. eZContentObjectAttribute->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:122
      PHP   3. eZImageType->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/ezcontentobjectattribute.php:1159
      PHP   4. eZImageAliasHandler->setAttribute() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagetype.php:623
      PHP   5. eZImageAliasHandler->recreateDOMTree() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:146
      PHP Notice:  Undefined index: height in /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 934
      PHP Stack trace:
      PHP   1. {main}() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:0
      PHP   2. eZContentObjectAttribute->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:122
      PHP   3. eZImageType->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/ezcontentobjectattribute.php:1159
      PHP   4. eZImageAliasHandler->setAttribute() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagetype.php:623
      PHP   5. eZImageAliasHandler->recreateDOMTree() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:146
      PHP Notice:  Undefined index: timestamp in /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php on line 937
      PHP Stack trace:
      PHP   1. {main}() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:0
      PHP   2. eZContentObjectAttribute->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/bin/php/ezcsvimport.php:122
      PHP   3. eZImageType->fromString() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/ezcontentobjectattribute.php:1159
      PHP   4. eZImageAliasHandler->setAttribute() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagetype.php:623
      PHP   5. eZImageAliasHandler->recreateDOMTree() /var/www/apache2php53/ezpublish5/ezpublish_legacy/kernel/classes/datatypes/ezimage/ezimagealiashandler.php:146
      
      

      – I then saw that a new empty folder and sub-folder (561/1-eng-GB) were created in ezpublish_legacy/var/ezdemo_site/storage/images-versioned. It seems that when importing, an image-versioned folder is created and then ezcsvimport.php is trying to import an unexisting image from there (getimagesize(var/ezdemo_site/storage/images-versioned/561/1-eng-GB/paulo1.)). Since the image does not exist, the warning is raised.

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulo.nunes-obsolete@ez.no Paulo Nunes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: