When I upload a picture with the article form using a site alias, the picture is uploaded in the "files/field/image" directory but pictures aren't resized in "files/styles/[thumbnail|medium|large]/public/field/image/" directories by the image core module. However, when I use the real URL, the resizing process works fine.

CommentFileSizeAuthor
#1 patch.txt7.04 KBThomas Bosviel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Thomas Bosviel’s picture

FileSize
7.04 KB

In the file "includes/bootstrap.inc", I found this comment of "conf_path" function :
"If a file named sites.php is present in the $confdir, it will be loaded prior to scanning for directories. It should define an associative array named $sites, which maps domains to directories. [...] Since Drupal stores file paths into the database (files, system table, etc.) this will ensure the paths are correct while accessed on development servers."
I set up this new feature and picture upload works fine with site alias. So, I propose this patch to ensure the new Drupal's multi-site directory aliasing feature compatibility.

Thomas Bosviel’s picture

Status: Active » Needs review
anarcat’s picture

Status: Needs review » Fixed

Okay, this is pretty amazing stuff. I didn't even know about sites.php! :)

Does that mean that symlinks are not relevant in d7 anymore?

I think the patch looks good, I'll just merge it and we'll bite the bullet here. I tested aliases and it seemed to work fine...

One thing for the future though:

<stdin>:51: trailing whitespace.

<stdin>:60: trailing whitespace.

<stdin>:67: trailing whitespace.

warning: 3 lines add whitespace errors.

... that's what git apply tells me, try not to introduce whitespace changes in your patches...

Otherwise, this is committed and will be shipped in 1.0, thank you for this excellent patch!

Status: Fixed » Closed (fixed)
Issue tags: -alias, -picture, -resize, -#D7

Automatically closed -- issue fixed for 2 weeks with no activity.