The Book module creates "Printer-friendly version" at the bottom of Book pages. If you hit that link from a page with child pages, Drupal creates a printer-friendly page from that page and its child pages. If you hit the link from the Book's top page, you get the whole book in a single page!
How to fix broken image paths when changing download method from Private to Public?
This is a long-running question I've had. I can't find a forum post with exactly the same question, though this one comes close: http://drupal.org/node/489850
I have a site that's used the Private download method from the start. I'd like to switch to Public, so I can enable CSS optimization. Easy enough to do, and most images – logo, and images inserted into text via TinyMCE – are unaffected.
But I also have many nodes with images attached via the Images module, which adds an "Attached images" upload option to nodes. (Side note: Why it's labeled "Attached images" when it appears to allow attachment of only one image, I don't know.) Paths to those images break when switching download methods (which, fairly enough, warns in advance of such trouble).
The site is one of several on a single Drupal installation, so there's a path
drupal_directory/sites/site.com/
The file system path is set to
sites/site.com/files
The Image module adds to the above path – adding "/images" in my case – resulting in
sites/site.com/files/images
Images so far have been uploaded, by whatever means, to
drupal_directory/sites/site.com/files/images
This results in images which appear on pages to have the underlying URL
http://www.site.com/system/files/images/image.png
(It's my understanding that the "system/" that gets tossed in there is normal Drupal behavior.)
So far so good. But when switching to Public download, images uploaded via the Images module cease to display; the placeholder "broken image" square that appears instead has the wacky URL
http://www.site.com/sites/site.com/files/images/image.png
Even uploading a fresh image via "Attach images" doesn't fix things; the newly uploaded image still gains an unworkable URL. I'm stumped as to how to tell the Image module to fix that URL and look for the images in the normal place. Anyone know a solution?
As of January 2010, I have no answer to the problem – but suddenly have no problem, either. In the kind of unsatisfying conclusion that happens time and again, I find that I can now change all affected sites to Public download, and even enable optimization of CSS and Javascript at Administer » Site configuration » Performance (which was the point of it all). After doing so, images display normally – even though the images still have the screwy addresses, like http://www.site.com/sites/site.com/files/images/image.png, that earlier resulted only in "image broken" placeholders.
That's if I'm logged in. If not logged in, image addresses have the nice expected form http://www.site.com/system/files/images/image.png. Can't these images make up their minds? But either way, they seem to display just fine.
So, what gives? I can't say. I don't recall making any major changes to the system that would affect this; perhaps it was simply an upgrade to the Image module somewhere between then and now (I'm currently running 6.x-1.0-alpha4).
If you've had this same problem, all I can suggest is trying the change from Private to Public again, especially if you've made any changes to Drupal or modules recently. Who knows, it just may suddenly work.
Relevant Content
The Drupal Ace logo has dealt these content suggestions from the deck.
- Changing download method from Private to Public: Image problems solved (somehow)
- Drupal New Site Setup Checklist
- How to stop Drupal from logging error messages to screen?
- Things theme different...
- How to make Lightbox2 work for Views images and inline images?
- More EDAM updates!
- Flexible WYSIWYG editing for Drupal
Learn Drupal, hands-on
Get the beginner-friendly ebook that teaches community site building via a live case study.







Did you see this?
http://drupal.org/node/258099
Fixing image paths
No, when I was looking for a fix, I didn't see that. Good info; it looks like it directly addresses the issue (and it's an issue that seems to pop up for plenty of users).
My problem disappeared on its own somehow, so I don't have opportunity to further play with fixes right now. But I just know it'll hit me again someday, somewhere... so again, thanks for the pointer!
test comment!
test comment!
Post new comment