I marked as major because it is major to me. I need this working by today :-(
Info requested.
1. CCK version - 2.9
2. imagefield version - 3.10
3. permissions for your tmp and files directory. - tmp = drwxrwxrwx, files = drwxrwxrwx
4. download method (public or private files) - public
5. imagefield configuration - default except added alt and unlimited uploads
6. expected results - the images should show in node view
7. the unexpected actual results - images don't show
8. Steps to reproduce the problem. - create a multi-site setup with a copy of the site as a subdomain.
This is what's happening in the duplicate site. The node with four images shows the images in edit mode but not view mode. I removed and uploaded one of the images. The reuploaded image shows in node view mode.
Path for re-uploaded image =
![]()
Path for image that isn't working =
![]()
Notice how /sites/default/files is being inserted. This is from the original site, where the copy comes from.
I really! need to be able to copy the site and have it work. These are training sites.
thoughts!
Comments
Comment #1
idcm commentedthe path got stripped from my post above. here they are without the <>
path working for reuploaded =
img class="imagefield imagefield-field_imagefield" width="640" height="480" alt="" src="http://oneday3.sitename.com/sites/oneday3.sitename.com/files/chimpanzee_..."
path for "copied" image =
img class="imagefield imagefield-field_imagefield" width="600" height="491" alt="" src="http://oneday3.sitename.com/sites/oneday3.sitename.com/files/sites/defau..."
/sites/default/files inserted in "broken" path
Comment #2
idcm commentedMore info:
1. the image field is being shared between three content types: a custom CT called company, story, and page.
2. it was first created on the company CT.
3. image on company CT's show image correctly without re-upload.
4. problem is occurring on story CT.
5. the following is stored in content_node_field_instance table - I assume this is an imagefield module table. why are they all referencing the default site path to one image? Also, the imagefield_default_images directory only has the one image. the other images are directly under files. Maybe this has nothing to do with it but it seemed odd.
In the company content type widget settings includes: s:8:"filepath";s:62:"sites/default/files/imagefield_default_images/placeholder2.jpg";
In the story CT, widget settings includes: s:8:"filepath";s:62:"sites/default/files/imagefield_default_images/placeholder2.jpg";
In the page content type widget settings includes: s:8:"filepath";s:62:"sites/default/files/imagefield_default_images/placeholder2.jpg";
update: i should note that these paths are in the database associated with site copy.
Comment #3
idcm commentedRan another test. I gave story its own imagefield. recreated the test node with the images. then made a copy of the site. the copy still doesn't display the images in the text node. Plus ... the data stored in content_node_field_instance table makes no filepath reference either in the original db or the copy. It shows this:
a:19:{s:15:"file_extensions";s:16:"png gif jpg jpeg";s:9:"file_path";s:0:"";s:18:"progress_indicator";s:3:"bar";s:21:"max_filesize_per_file";s:0:"";s:21:"max_filesize_per_node";s:0:"";s:14:"max_resolution";s:1:"0";s:14:"min_resolution";s:1:"0";s:3:"alt";s:0:"";s:10:"custom_alt";i:1;s:5:"title";s:0:"";s:12:"custom_title";i:0;s:10:"title_type";s:9:"textfield";s:13:"default_image";N;s:17:"use_default_image";i:0;s:6:"insert";i:0;s:13:"insert_styles";a:8:{s:4:"auto";i:0;s:4:"link";i:0;s:5:"image";i:0;s:20:"imagecache_image_150";i:0;s:20:"imagecache_image_250";i:0;s:20:"imagecache_image_300";i:0;s:20:"imagecache_image_325";i:0;s:20:"imagecache_image_350";i:0;}s:14:"insert_default";s:4:"auto";s:12:"insert_class";s:0:"";s:12:"insert_width";s:0:"";}
so ... I am really stumped. Where is the corrupt path coming from? One of the settings above must be code for how the path is configured because the new copy of the site with the new imagefield renders this in the
HTML source:
http://oneday2.nameofsite.com/sites/oneday2.idcminnovations.com/files/si..." />
/files/sites/oneday3.nameofsite.com/ - this is the "original" site in this test and oneday2 is the copy.
help please!
Comment #4
quicksketchI've answered this question many times. Simply put, you cannot move the files directory. Ever.
It's not ImageField or FileField, it's limitation of Drupal (but finally fixed in Drupal 7, thank goodness). If you move the files directory, you need manually update the "files" table to reflect the new location for every entry in the whole table.
#983324: Move to new domain, Page Not Found error on filefield links
#409884: a way to refresh filepaths stored in database?
#729292: ImageField stores complete system path if files table
#324474: migrating servers issue
#434458: Invalid path / file not found
#98199: ['filepath'] is'nt portable. Move servers, change Settings > File system path - everything breaks and can't be updated.
#314022: Problems when moving Drupal sites/files directory
Comment #5
idcm commentedI am sorry to have missed the other posts on this issue. So many ... how did I miss them. I hunted for a long time. I guess I didn't search on the right terms. Thank you forgetting back to me so quickly. Good to hear about D7.
Comment #6
quicksketch