Reviewed & tested by the community
Project:
IMCE Rename
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2011 at 16:06 UTC
Updated:
26 Jun 2020 at 15:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anthony Gaudino commentedI think I solved this issue. See the attached patch for the 7.x-1.x-dev version.
This problem was caused by not having a file entry in the file_managed table.
Every time you try to rename/move a file the module get a file object from this table, since theres no entry to the table, there will not have any data in the generated $file object.
I didn't notice this problem with folders, because they don't have a entry and the rename/move operation is different.
Comment #2
jochen wendebaum commentedThe patch works fine, I would recommend to add it to the release! :-)
The only minor thing is that it jumps you back to the root folder. But this is not really a problem.
Comment #3
hefox commentedPatch has some malformed characters at bottom
Comment #4
hefox commentedComment #5
hefox commentedfixing file name so applies with -p1
Comment #6
jmuzz commentedI got this error even for files in root of public:// .
#5 worked for me.
Comment #7
hefox commentedif( needs a space
Comment #8
jmuzz commentedYes.
Comment #9
maedi commentedI've updated the patch to properly create the file object before assigning property values to it. Which fixes this warning:
Warning: Creating default object from empty value in imce_rename_file() (line 116The module hasn't been updated in 5 years and this patch is 3 years old. Please someone apply this! The module doesn't work without it.
Comment #10
xorunaI applied the patch in #9 but it failed at line 36. Then I tried the patch in #8, it works nice. Thanks.