Closed (fixed)
Project:
Image
Version:
5.x-1.x-dev
Component:
image.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 May 2007 at 07:29 UTC
Updated:
21 Jul 2007 at 20:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
derbz2 commentedOk, this does not fully fix the bug, the line needs to exist but i think it may need to be rewritten.
Comment #2
derbz2 commentedSo, ya. I was right the first time, Image module is now writing 'files/images/' instead of 'images/' to files table prepending file names which is odd. Removing the line does fix the problem but all previous images' file paths need to be changed in files table.
Comment #3
kbahey commentedI am not sure why image is doing this.
The code in image has the same as watermark:
variable_get('file_directory_path', 'files')I am transferring this to image module, to get comments on it, and making it a support request.
Comment #4
drewish commentedit's been putting them inside the files directory for all the 5 versions i've worked with...
Comment #5
kbahey commentedThe question is:
- What got stored in the files tables in 4.7 (files/images/, or just images/)?
- Did that change for 5.x?
- Why did it change? Is it a bug or a feature.
Comment #6
mcurry commented*subscribe*
Happening here too. I 'upgraded' from Image 5.x-1.0 to 5.x-1.1.
My 'Default image path:' is 'images/node'
My 'File System Path' is 'sites/default/files'
I reverted to the image 5.x-1.0 version and things are back to normal.
Comment #7
tknospdr commentedI get the same problem:
I'm working on a clean install of Drupal 5.1 and I've tried all sorts of things to make sure my path is right.
I'll try out the code change when I get home this evening.
Comment #8
drewish commentedmarked http://drupal.org/node/146312 as a duplicate of this.
Comment #9
mianwo commentedSomeone tried to solve this problem?
I guess this is not a big bug, just remove "files/" from paths before write them to db should be ok...
Comment #10
OSLinux commentedKeep using image module 1 dev and it still works...
Comment #11
drewish commentedthere's some code over on http://drupal.org/node/152093 that might help resolve this.
Comment #12
Tresler commentedSo yea this is the code drwish is referring too, I don't know how it happened, but the paths being pulled from the files directory are no longer correct on upgrade.
Here is what I used to fix it - just pasted it into devel.module and ran it to pull all the records and alter them and re-insert them
THIS IS NOT A FIX!!!! Just a start to one - also be ultra careful - if you have more than images stored in files this code as-is WILL break their paths.
Good luck.
Comment #13
drewish commentedi've got a little time now to try to write an update to fix this for people upgrading from 4.7. if you had this issue please contact me via my user contact form. i want to get a copy some of the data in your fiiles table and path and directory listing for the images folder.
Comment #14
drewish commentedokay, here's a patch that should clear it up. i'd love to have some testers. please back up your database before trying this out. i've run it on my sites but i don't have a multisite setup.
Comment #15
drewish commentedlittle bit better patch. deletes unmatched rows in files_revisions.
Comment #16
drewish commentedComment #17
drewish commentedthis now removes {file} rows with duplicate nid/filepaths.
Comment #18
drewish commentedI've committed this to HEAD and DRUPAL-5.
Comment #19
drewish commentedhad a bug in the query. didn't {} table names
Comment #20
drewish commentedi committed that last patch.
Comment #21
(not verified) commented