I had configurate a multisite and trying to use the theme_image_style functionality to create picture on the fly but it does not work.
I am using the multisite configuration with just one DB instance for all sites. My problem is directly with the usability of theme_image_style.
$sites['mysite.com'] = 'default';
$sites['m.mysite.com'] = 'mobile';
mobile/files is a symbolic link to default/files. Even if I do not use a symbolic link, it does not work either.
- theme_style_image return the right URL and looks working perfectly but...
- theme_style_image does not create the images in files/
I do not understand why images are not created for other sites that are not the default one. Please help, I am in the middle of a big development and the architecture requires this working.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | image-multisite-1965620-01.patch | 4 KB | farfanfelipe |
Comments
Comment #1
catchThis is a support request, moving to the right queue.
You should debug in the image module where derivatives are created/written to disk to see what's going on there.
Comment #2
farfanfelipe commentedI do not find the trigger for Drupal creating the physical image. Somebody knows about it?
Comment #3
farfanfelipe commentedFile: \modules\image\image.module
Lines: 83 - 90
Why: the multisite configuration is not supported by image core.
I can fix it setting an array with the multisite folder configuration but I want to set it as generic. How?
Ideas?
Note: I want to mention that I am using the same DB instance for all sites and same Drupal core... Typical multisite configuration.
Comment #4
farfanfelipe commentedAdding items for each site into the image_menu solve the problem. I will create a patch to fix this.
Comment #5
farfanfelipe commentedI create the patch but not sure if I successfully uploaded to Drupal.
image-multisite-1965620-01.patch
Comment #6
farfanfelipe commentedCreated patch !
Comment #7
David_Rothstein commented@farfanfelipe, are you trying to have one site in a multisite configuration write to another site's files directory?
Drupal doesn't support that; sites in a multisite configuration are supposed to be completely independent Drupal installations that only share the same code (see http://drupal.org/documentation/install/multi-site).
However, if you're trying to make that happen in a custom setup, something similar to the code you wrote above might work. You'd probably want to put that in a custom module.
Comment #8
farfanfelipe commentedYes, I already have different sites under one Drupal core with one DB instance and Drupal itself support that. I created a custom module to handle the permission of content for the different sites, nothing fancy and it is the part that Drupal does not have as functionality. I wanted to implement the image problem and I think that should be part of Drupal core because I am not the only one trying to implement multisite using the same core and BD but they did not figure it out and this implementation can help to improve Drupal for multisite. Don't you think?
Comment #9
farfanfelipe commentedI already applied to my sites as part of a custom module but I believe this can be really useful for the Drupal community.