All the images in my photogallary (image_gallery) are gone!
All the images from a custom view are gone

(here is the image link from the browser
http://scuolasnowboardmontebianco.com/sites/default/files/domain-2/sites...
http://scuolascimontebianco.com/sites/default/files/domain-2/sites/defau...)

Why the images is been searched from /sites/default/files/domain-2/sites/default/files/... ???
The settings.php path is /sites/default/settings.php
All the original images are in /sites/default/files/images

Apache/2.2.3 (CentOS)
Mysql 5.0.86
PHP 5.2.11

Domain Access Modules Installed
Domain Access
Domain Configuration
Domain Content
Domain Navigation
Domain Source
Domain Theme
Domain Views

Settings
WWW prefix handling: Process all host requests normally
Search engine optimization: Rewrite all URLs to point to a single source

No other access modules

The secondary domain is set throught a symlink.

Please, I really need any help.

Comments

agentrickard’s picture

Check to see if you are using token values in the image uploads. I assume you are using imagefield, which supports domain-based path tokens. That's what this looks like.

Otherwise, I have no answer for you. We do not alter the file path handling in Domain Access.

Anonymous’s picture

I use image-6.x-1.0-beta3 and image_fupload-6.x-3.x-dev
It seems there is a similar issue at http://drupal.org/node/433978
Could be a views issue?

Any help is appreciated, I'm not expert. Thanks.

agentrickard’s picture

Virtually impossible to say. There are too many factors in play here.

Anonymous’s picture

Status: Active » Closed (fixed)

ok,
domain access in not for me, I'm not expert.
thanks

Anonymous’s picture

Status: Closed (fixed) » Active

I deeply investigated about the setting process of Domain Access and I found when the issue shows up (after step 15).

1) I'm using Views 6.x-3.x-dev.
2) Created a View Page...
2a) The images in that view page are visibiles
link location: http://scuolascimontebianco/maestri/aprato-matteo
image location: http://scuolascimontebianco/sites/default/files/ritratti/aprato_matteo.j...

3) I append to settings.php the line: include './sites/all/modules/domain/settings.inc';

4) I do Fresh install of domain access (domain-6.x-2.0)
5) I activate Domain Access module
6) I do Rebuilding content access permissions

7) I create the secondary domain and the images in the primary domain are still visibles
8) I got warning about: http://www.scuolasnowboardmontebianco.com/sites/all/modules/domain/tests... is not responding and may not be configured correctly at the server level. Server code 404 was returned.
9) So I create the symlink to point the secondary domain to the primary's "base_url"
10) I got warning about: http://www.scuolasnowboardmontebianco.com/sites/all/modules/domain/tests... is not responding and may not be configured correctly at the server level. Server code 403 was returned.
10a) warning: unlink(sites/default/files/css/css_d8ea817357e93a18e77c63068dff1411.css) ...and others css files
10b) warning: unlink(sites/default/files/js/js_9dbbc8d8b85c5f4a4abeec2ad5f3bcd3.js) ...and others js files
11) So I change permissions/owner of all the primary site, and the warnings disappear

12) I activate Domain Theme sub-module
13) I activate Bluemarine theme

14) The images in the secondary's view page are visibles
link location: http://www.scuolasnowboardmontebianco.com/maestri/aprato-matteo
image location: http://www.scuolasnowboardmontebianco.com/sites/default/files/ritratti/a...

15) When I try to configure Bluemarine theme (or any other theme) "The directory sites/default/files/domain-2 has been created." and than following errors
15a) warning: file_get_contents(sites/default/files/domain-2/languages/it_2be0e27c96a4c82308b20b35e7ced4d7.js) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/vhosts/scuolascimontebianco.com/httpdocs/includes/common.inc on line 2403.
15b) warning: file_get_contents(sites/default/files/domain-2/languages/it_2be0e27c96a4c82308b20b35e7ced4d7.js) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/vhosts/scuolascimontebianco.com/httpdocs/includes/common.inc on line 2403.
15c) The directory sites/default/files/domain-2/backup_migrate has been created.
15d) The directory sites/default/files/domain-2/backup_migrate/manual has been created.
15e) The directory sites/default/files/domain-2/backup_migrate/scheduled has been created.

ALL THE IMAGES FROM VIEWS since this moment ARE NOT VISIBLES

infact
link location: http://scuolasnowboardmontebianco.com/maestri/aprato-matteo
image location: http://scuolasnowboardmontebianco.com/sites/default/files/domain-2/sites...

Every time a clear the cache /domain-2/ subfolder is created in sites/default/files/, this means after three chace clears the images are searched in sites/default/files/domain-2/domain-2/domain-2/

Any idea how to solve the problem?

agentrickard’s picture

Component: Code » - Domain Theme

Thank you for the detailed report. I am traveling and will not be able to review for a few days.

There is something in the theme layer that is getting confused and it looks like that is causing the problem.

Are you using JavaScript compression? I am looking at this part of the error:

default/files/domain-2/languages/it_2be0e27c96a4c82308b20b35e7ced4d7.js

Where is that languages JS file coming from? Do you have any idea?

It looks like something is crashing and setting the files directory to the wrong value _permanently_ instead of temporarily.

What modules are you running?

Anonymous’s picture

here are more detalis:
- I enabled "Optimize JavaScript files" in /admin/settings/performance. (I also tryied to disable it)
- The language JS file is usually stored in /sites/default/files/languages/ ...and I suppose is coming from i18 module.

But here is the curios thing:
When I try to configure the secondary theme (/admin/build/domain/theme/bluemarine/2/theme-settings) ->
The directory "sites/default/files/domain-2" is created.
The Table: variable is altered to: file_directory_path -> s:28:"sites/default/files/domain-2";
The Table: i18n_variable is altered to: s:28:"sites/default/files/domain-2";
The Table: cache is altered to: variables -> [BLOB DATA] containing some "domain-2"
From now on all the images are missing.

And every time I clear the cache File system path append "domain-2".
If I restore File system path to: sites/default/files the images come back

I also noted that when I try to set different theme for secondary site (/admin/build/domain/batch/site_theme), the theme is not changed and persist the primary's one.

I'd like to give you more infos, but I'm really beginner in drupal/php. I hope this help.

Anonymous’s picture

Status: Active » Closed (fixed)

I feel a perfect idiot!
After 2 full days investigating on this issue, I realize that I put some empty i18 variables into settings.php. I deleted them, all the problems are gone away!