Hi everyone!
I recently installed drupal 7. And started building my site with batrik theme.
But whenever i try to upload a picture with any of my content type it gives error e.g. just a small square in place of the picture.
Please guide! what could be possible reasons for this error?
My site url:
http://www.babarhussain.net/en

Comments

DaiLaughing’s picture

I have spent all day on this one. Clean install of Drupal 7 on a subdomain of an existing site (not mine so I can't give a link). Worked fine once I changed htaccess options.

Then I realise that there is no rich text editor with Drupal by default and as I use CKEditor on Moodle and my own sites I thought I might as well stick with that. I installed the module and then couldn't get images uploaded by elfinder to work so I tried wysiwyg and IMCE instead. No good.

With everything I have tried (some below) the result is the same - the image file is not found and so not displayed. The image is in the upload directory (sites/default/files) but does not appear in CKEditor or on the final page. As a drupal noob I don't know enough to know what the URL should look like but it is:

drupal.example.com/sites/default/files/image.jpg

which to me seems wrong on a CMS with clean URLs disabled (because it is a sub domain). Unfortunately I don't know either what it should be or how to get it inserted automatically but correctly.

I have hunted around all day and tried every solution I could see suggested with no change. So if anyone can help Babar maybe they will help a lot of others as well. Off to continue my hunt in these forums!

I have tried these and more:

  • changing permissions on the above upload directory and it's parents and the file itself
  • setting the base URL in settings.php for the default site
  • loads of versions of everything (except drupal itself) from latest (including dev) down to a couple of versions old and in various combinations
  • different combinations - CKEditor/IMCE, CKEditor/Elfinder, CKEDditor/wysiwyg/IMCE or Media, YUI with most of those etc.
  • editing various config files for hours
  • making sure tags are not filtered in Full HTML even though they are not!
  • using more up-to-date jQuery libraries

With the media module handling file upload I can upload and pick a file which then shows in the preview (unlike CKE and ELFinder) but in source view I can see that this is a media tag of some sort:

[[{"type":"media","view_mode":"media_large","fid":"3","attributes":{"alt":"","class":"media-image","height":"96","typeof":"foaf:Image","width":"480"}}]]

when that is saved it gets converted to HTML and ends up almost like the others:

http://drupal.example.com/sites/default/files/styles/large/public/image....

With CKEditor and IMCE I can create thumbnails during the upload which does not seem to be an option with the other methods. Neither thumbnail nor full image work.

Edit: the next morning! Just made an identical installation locally using xampp and it works fine. So hosting?

vm’s picture