Hey there,
if you transliterate files over the backend (admin/config/media/file-system/transliteration) you will get the following error message:
Fatal error: Unsupported operand types in /path/to/drupal/sites/all/modules/contrib/file_entity/file_entity.file.inc on line 103
I know that this error is coming from another module, but it mainly occurs, because the hook is used in a wrong manner.
If an update hook is called an "original" is always used in all of Drupals internals and should be provided here, too.
Since natural methods of doing so are not used (avoiding file_save()) it needs to be done manually. Also to follow the file_save() function's behavior "module_invoke_all('entity_update', $file, 'file');" should be called, too.
Anyways, I think the best way to this issue is to just call file_save().
The comment saying "Don't use file_save() as it modifies the timestamp." is not a real reason, because the file itself is modified. The date should be therefore update.
Please consider this change back to the way it should be.
func0der
Comment | File | Size | Author |
---|---|---|---|
#5 | transliteration-wrongly_called_file_update_hook-2602512-5.patch | 613 bytes | joep.hendrix |
#2 | transliteration-wrongly_called_file_update_hook-2602512-1.patch | 813 bytes | func0der |
Comments
Comment #2
func0der CreditAttribution: func0der commentedHere comes da patch, ready or not, here comes da...how you like me now?
Comment #3
func0der CreditAttribution: func0der commentedComment #4
ShaneOnABike CreditAttribution: ShaneOnABike commentedI can confirm that this patch works. I was also receiving the same error and I was getting teh WSOD
Comment #5
joep.hendrix CreditAttribution: joep.hendrix at CompuBase Internet Solutions commentedRemoved the paths in the patch file.
Comment #6
cassien CreditAttribution: cassien commented#5 works like a charm
Comment #7
Chris Matthews CreditAttribution: Chris Matthews commentedThe 2 year old patch in #5 applied cleanly to the latest 7.x-3.x-dev snapshot and works for me as well so changing the status to RTBC.
Comment #8
renatogThank you all for the contribution
Comment #10
renatogCommitted to the dev branch.
Best