Tuesday 03 February 2015 9:17:11 am - 13 replies
After upgrading to 2014.11 i got this error on some page and when i try to empty the trash :
Argument 'BinaryFile::id' is invalid: '/trashed/d41d8cd98f00b204e9800998ecf8427e.' is wrong value in class 'BinaryFile'
Thursday 12 February 2015 9:20:57 am
Did you find a solution for this? I get the same error as well after upgrading from 5.3 to 5.4. It will no longer load related images/files and only gives this exception:
An exception has been thrown during the rendering of a template ("Argument 'BinaryFile::id' is invalid: 'var/ezdemo_site/storage/images/media/images/artikkelfoto/hhd14_13frontarktis/83885-3-nor-NO/HHD14_13FrontArktis.jpg' is wrong value in class 'BinaryFile'
Tuesday 17 February 2015 2:36:46 am
Hello Folks,
Would you consider publishing a gist with your full vhost configuration?
It sounds like your mod_rewrite rules are not correct as accessing var directory files like image aliases (the example provided above) should not involve eZ Publish at all and the web server should serve the file directly from disk (again without involving eZ Publish -at all-).
Here is the official documentation on the reference apache2 vhost configuration:
https://doc.ez.no/display/EZP/Virtual+host+setup
https://github.com/ezsystems/ezpublish-community/tree/master/doc/apache2
https://github.com/ezsystems/ezpu...ob/master/doc/apache2/vhost.template
I hope this helps!
Cheers,
Heath
Modified on Tuesday 17 February 2015 6:41:53 am by // Heath
Tuesday 17 February 2015 10:44:30 am
Hi there,
I encountered the same problem when I decided to upgrade to 2014.11 (cf. http://share.ez.no/forums/ez-publish-5-platform/argument-id-is-invalid-prefix-images-not-found-and-argument-binaryfile-id-is-invalid).
Here's the vhost I used (obtained from documentation):
Modified on Tuesday 17 February 2015 10:46:42 am by Julien Huon
Wednesday 11 March 2015 2:57:10 pm
Dont know if you guys still have the problem.
But, I ran into the same issues. My solution was to change the var dir in the yml configuration.
Its a check if the image directory contains the var directory set here:
ezpublish: system: ezdemo_site_group: var_dir: var
The default was var/ezdemo_site, but my images was located in var/storage.
Wednesday 11 March 2015 11:03:49 pm
Thank you very much for sharing this Anders !
Fact is that eZ Publish 5 isn't very tolerant of path it doesn't know about. Note that there is a script, written for legacy, that can move files from "old" var directories to the new one, in order to cleanly fix the problem.
I'm still pretty sure this was mentioned in the upgrade doc... if it wasn't, it needs to be
Saturday 14 March 2015 10:57:14 am
Monday 23 March 2015 4:15:12 pm
Quote from Bertrand Dunogier :Thank you very much for sharing this Anders !
Fact is that eZ Publish 5 isn't very tolerant of path it doesn't know about. Note that there is a script, written for legacy, that can move files from "old" var directories to the new one, in order to cleanly fix the problem.
I'm still pretty sure this was mentioned in the upgrade doc... if it wasn't, it needs to be
I'm interested where this script can be found, can someone point the way?
Monday 23 March 2015 7:19:29 pm
Hello,
I find no mention of such a script in the related documentation:
https://doc.ez.no/eZ-Publish/Upgrading/The-system-upgrade-scripts
Perhaps Bertrand can clarify or be more specific? Inquiring minds want to know
Cheers,
Heath
Monday 23 March 2015 7:32:20 pm
Hello,
After some additional searching I was able to find that the above link is only for 3.x scripts (how disappointing) and I also found this in the 'Direct upgrading from 4.7 to 5.1' docs:
https://doc.ez.no/eZ-Publish/Upgr...ding-from-4.7-to-5.1#eztoc135451_0_8
This step is optional if you didn't changed the default location of eZ Publish's "var" dir.
If you intend to use a different location for the "var" dir paths to images may need to be fixed.
For that, please be sure to copy or move all the content from your initial var dir location, into your new var dir location.
Then, run the following script to fix the file locations:
cd /<ezp5-root>/ezpublish_legacy/; php update/common/scripts/5.1/fiximagesoutsidevardir.php
IMPORTANT: This script only fixes the path to images. Binary files can be fixed on non clustered environnements (FS) by moving the storage/original folder to the new location. This workaround does not apply to DB/DFS setups.
https://github.com/ezsystems/ezpu...ripts/5.1/fiximagesoutsidevardir.php
Note that this solution is just for images not files. For files the docs seem to indicate doing a manual move unless your using a cluster which I can only imagine needs a script created to do much like the image script does.
I hope this helps!
Cheers,
Heath
Saturday 28 March 2015 2:31:27 pm
Thank you for the analysis, Heath ! I'll add a couple notes about non-images binary files, as images & non-images are quite different.
I'll set the use-case I'm covering here first: the VarDir setting was changed at some point, and existing images/files were not moved.
In a nutshell, (non-images) binary files don't work in that case, period. Those are referenced (in ezbinaryfile & ezmediafile) using a relative path in the database (application/somemd5.pdf), and are looked up in the configured var directory. If the files have not been moved, they're already broken. Moving them manually fixes the problem. This is a problem with a cluster. It might be possible to do something using the clusterize script...
Images are different: their absolute HTTP uri is used to reference them (in ezimagefile & ezcontentobject_attribute), and if they're moved, they will still be searched in the old vardir. This is where the new stack will shout. The script discussed above fixes this exact issue, and takes care of updating the XML & attribute.
Tuesday 21 April 2015 11:59:28 am
Hello,
I was installing ezpublish-community today (via composer) and found that I got an error by default!
The default content provided by the ezdemo legacy package, on the default homepage, (tries) to display a video but the video data load causes an error 500 which trying to load the video file data.
This was the url to the file in question: http://ezp5dev/var/ezdemo_site/storage/original/video/cbca3a8812784f3989158d295cc0c016.mp4
The specific error text (in symfony stack) was: "Argument '$id' is invalid: Prefix images not found in original/video/cbca3a8812784f3989158d295cc0c016.mp4
500 Internal Server Error - InvalidArgumentException"This was in the error page log (highlighted):
CRITICAL - Uncaught PHP Exception eZ\Publish\Core\Base\Exceptions\InvalidArgumentException: "Argument '$id' is invalid: Prefix images not found in original/video/cbca3a8812784f3989158d295cc0c016.mp4" at /Users/graham/web/ez/ezpublish-community/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/IO/IOService.php line 292
I did some more research on the error in question since I was now being affected by it (by default) and found the following related issue tickets and official fix!
Error (in general): https://jira.ez.no/browse/EZP-23980
Official Solution: https://jira.ez.no/browse/EZP-23550
Basically to solve the error(s) in question (as related to the ezbinaryfile datatype) adding the following into the default vhost config mod_rewrite rules:
# Custom re-write rules additions as directed by: https://jira.ez.no/browse/EZP-23550, https://jira.ez.no/browse/EZP-23980 RewriteRule ^/var/storage/.* - [L] RewriteRule ^/var/[^/]+/storage/.* - [L]
The solution worked for me.
Worth noting this is only an ez5 dual kernel community build error.
In theory at this point a PR should be made to provide these mod_rewrite rules by default in the default example configs. I'll talk to Bertrand about this soon and prolly build the needed PR to solve this problem the right way for everyone!
I hope this helps!
Cheers,
Heath
Modified on Tuesday 21 April 2015 12:00:21 pm by // Heath
You must be logged in to post messages in this topic!