Hey guys, it’s me again with an error message…
I’m currently installing a fresh Neos webpage on our customers server but I can’t make it to import the site from the package. The command gives me the following error upon execution:
During the import of the “Sites.xml” from the package “Vendor.Site” an exception occurred: Error: During import 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 “a951e02a89904b202015a59bc2ca183df0d6e991” does not exist or is not a valid image.“., see log for further information.
Within the referenced exception log I can only find one more information, which is this line:
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 can of course attach the complete error log as a reference, but it is very large so I would only do this if requested.)
Honestly I don’t know why this happens. I already searched the forum for help but there were only two topics concerning this problem and none of them contained a solution.
I also checked for the Imagine driver and changed it, but that has no impact. Currently it’s set to Imagick which is verifiable available on the system but Gd (which is also present) doesn’t work either.
On our development-server the import works just fine so I’m assuming an inconsistency between the two hostings, but it’s not that easy to figure out because we only have limited access to the target server.
Can you possibly give me a clue where to look for the problem?
I also got the idea that the file permissions might not be set correctly, but we don’t have root or sudo permissions on the system so I can’t run the flow:core:setfilepermissions script. Is there an alternative to this, as I would like to rule this out as a source of error? I already read through the actual bash script and executed the chmod's and chown's manually but I don’t really know if it had any effect on the filesystem because we already have limited permissions.
Thanks in advance for your help.
Best regards, Max
Not sure if this is related, but I did experience something like this when re-importing images from the live server to the dev server when using different image libraries (GM vs IM).
In addition I still did not find out why the calculation of some of the SHA hashes for the images is wrong in my setup. This is still an issue for me and I even wrote a plugin that compares the SHA in the DB with the calculated file SHA.
For what it’s worth you can find the command I wrote for that at https://github.com/Weissheiten/Weissheiten.Neos.MediaTools
I just installed the mentioned plugin and executed the command. It seems as if no SHA1 hash could be calculated for a single asset file, there are only error messages everywhere. So I assume that I’m dealing with a permission problem and Neos can’t read the files somehow.
On the target server and on the source server Imagick is used equally, so I exclude different drivers as source of error for now.
But another question: If I reconfigure the source server to use GD, would that change anything about the export data? Or does a different driver have no effect on it? Otherwise I would create a new export with GD and see if the problem still exists or if it was a bug with Imagick or it’s setup on the server.
Quick update for all interested:
I still don’t know what exactly caused the problem but gladly it seems to be gone now.
Suddenly during my analysis, the import started working but I did so many steps in between so that I can’t distinguish which of them actually fixed the error. Next week I will try to recreate the situation and identify the source afterwards that way.
But I would like to come back to my additional question from the first post:
Since I’m still not quite sure if the file permissions were set correctly, I’d like to know that as well. Is there an alternative for the script if you don’t have the necessary permissions to run it (root, sudo)? Or do I have to get in touch with the provider of the server and try to acquire the necessary permissions temporarily somehow?