Closed (fixed)
Project:
Pathauto Entity
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2013 at 05:17 UTC
Updated:
16 Jan 2014 at 05:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
realityloop commentedpatch attached
Comment #2
realityloop commentedComment #3
Cale Bierman commentedI've tried adding a file using the Media Selector Widget and then replacing it with a new file and nothing has broken for me. This is without using the patch. Could you post some steps to replicate the issue?
Edit: I also used the the File widget
Comment #4
devin carlson commentedAs with #3, I'm also not having any issues with file replacement and I'm not seeing any usage of $file->destination.
Comment #4.0
devin carlson commentedadded more info
Comment #5
acbramley commentedI have just come across this issue with my instance. I'm running the latest dev version of file_entity and an older version of media module (7.x-2.0-unstable7+64-dev) I'm experiencing the same issue where if I debug $file in file_entity_edit_validate() after the call to file_save_upload the file does not contain a uri property. This makes the replacement fail although the new replacement file is uploaded as a temporary file. Will debug into file_save_upload to see how it's losing the uri property.
Comment #6
acbramley commentedIt seems like up until the file_save($file) in file_save_upload call the object has the uri parameter after which it drops off. Further debugging tracked it to directly after the module_invoke_all('entity_insert', $file, 'file'); in file_save() that the object no longer has a uri property. I suspect this is a contrib module doing something funny.
Comment #7
acbramley commentedI tracked this down to the pathauto_entity module after disabling that the errors disappeared and my file was updated correctly! This was a module recently added to the site so would explain the sudden breakage of this functionality
Comment #8
acbramley commentedBumping pathauto_entity to the full project version which is now available fixed my issues.
Comment #9
acbramley commented