By maias on
hi all
i have a problem with my drupal website
all images's content aren't displayed on pages , they are displayed as corrupted files , i checked following things and they are right :
- file system path setting in drupal.
- content fields configurations in drupal .
- files directory permissions on hosting server (755).
- i can preview images on hosting server (ftp connection).
- files table in database and paths in it .
after all the problem is persistence .
any help about this problem is appreciated .
Comments
It would help if you have a
It would help if you have a link for debugging, otherwise we are guessing.
You say "corrupted" - so you are sure they are not just missing or incorrect paths? What is the URL path when you try to view the image directly in your browser? EG, right-click and "view image" or inspect the view-source to check the paths for the img tags.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
URL on server
when i press right-click on an image and choose copy image URL , the resulted URL is right , is the right location of that image on hosting server
path in source code is right also
in source code
src attribute in img tag contains full path like http://www.xx.com/sites/default/files/image.jpg
Hm, well it's hard to imagine
Hm, well it's hard to imagine what the problem could be. It sounds like most things are correct.
I'd normally not expect to see the FULL URL in the view-source on a clean Drupal install, but it's possible (and common) to get that if you have manually set $base_url.
Normally I'd expect to see just src="/sites/default/files/image.jpg"
But that alone shouldn't be causing problems.
Normal other things to check are old common gotchas like spaces in filenames or capitalization differences - but you've not shown and examples where that could be seen. ... I'm just guessing now. And from your example, it doesn't seem to be any imagecache interference.
Have you checked your server logs? Drupal : admin : reports will list any 404s or errors, and there may be clues there. Or in your Apache logs if you have access to them.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
there aren't interestin drupal log's messages
there isn't any interest error message in drupal log
and i don't have privilege to access apache log
but there is one interest thing happened , website image icon wasn't displayed and it was on sites/default/files/xx.jpg
i moved it to themes/mytheme/images/xx.jpg and then change path of custom icon to match the new path in shortcut icon settings in themes admin in drupal , now icon is displayed , by the way , all images in theme directory are displayed like image in header website and recently icon image , only images in siltes/default/files aren't displayed .
another think
i detected file system as : sites/default/files
and i use imagefield module , and i create new content type which has many fields one of them is image type
and setup its path for that image field as directory within sites/default/files let me call imagedir so that any image add through website must be in sites/default/files/imagedir but now when i create new content and upload an image , i find it in sites/default/files not in sites/default/files/imagedir
why this happening .