No valid image error on site import

Hi, I am trying to import a site by doing so:

./flow site:import --site-node drsch --filename drs_export.xml

As an error I get:

During the import of the file “drs_export.xml” an exception occurred: Could not convert target type “Neos\Media\Domain\Model\Image”: Tried to refresh the dimensions and meta data of Image asset “” but the file of resource “18a0fd90911f0a88a9ff96e25195ef67a1716778” does not exist or is not a valid image., see log for further information.

In the logs I further see:

Previous exception: Exception #1336662898: The given resource was not an image file your choosen driver can open. The original error was: Variable does not contain a stream resource

I have two variations of the import file, one with internalized images, and one with externalized images, located in a subfolder “Resources” as dedicated files. Both fail the same way.

To all I can tell Imagick seems to be available. Those images the system fails on, seem to be valid - I can open those files regulary with a browser / editor.

What could be the reason for this issue?

Hi Daniel,

i have no specific suspicion in mind at this point but can you specify which Neos-version the export originates from and into wich Neos-version you try to import.

If there are differences this might be a hint.

Regards, Martin

Unfortunatly both systems (prod and test) run on Version 3.2

Too bad. I tested locally with an Neos 3.3 to export and import again and for me it works.

Maybe a workaround can help you: I usually use for fetching data from produsction back to my local-dev-environment. It works via ssh and mysql-dump and rsync and thus has some limitations but for me i can easily update my dev-version with live data of large neos sites.

ATTENTION Never deploy magicwand to the server.

To transfer data to a server i use mysqldump and rsync (Data/Persistent) … basically the same as magicwand but without having that code on the server.

The main limitation of this solutions compared to site-export and import is that you always export the whole db with all assets and users etc. sites and cannot import multiple exports into a single neos. On the other hand this makes sure all Assets, Tags etc. are also transferred and i can locally debug the personal workspace of the clones user-accounts if i have to.

This solved it for me while migrating to NEOS 4.0:

  1. Dropping the entire database with mysql
    Might be useful:SET FOREIGN_KEY_CHECKS = 0;

  2. ./flow doctrine:migrate
    Create all tabels again

  3. ./flow site:import --package-key XXX --name XXX