1

I've just encountered an issue I haven't seen seen before: after copying the dB/files to a new location on the server, none of the CCK images are working, regardless of if ImageCache is used or not. In other words, even when editing a node, the image preview is missing because the path is obviously wrong.

For one example, the path should be /sites/dev-[site-name]/files/homebanners/[image-name].

Instead it is /sites/dev-[site-name]/files/sites/[original-site]/files/homebanners/[image-name].

What I can't figure out is why.

Here's the steps taken:

  1. Copy the dB
  2. Copy the files. I forget why but the new sites/[site-name] mapping changes to sites/dev-[site-name] for the dev site (where the images are broken).
  3. Adjusted .htaccess RewriteBase & Rewrite Rules, and the base_url for each settings.php file
  4. Set the new files location at admin/settings/file-system
  5. Cleared the cache For the imagecache files, and used Drush to flush and re-build the images

For all but one site, the files use the Public setting, but the problem persists regardless of if the files are set to public or private.

Any help would be most appreciated.

Thanks,

Dan

0

Changing site URL with a multi-site setup in Drupal 6 is problematic as the paths in the file table will be incorrect. (See Migration failed)

In Drupal 7, you set up multi-site aliasing via the sites.php file (copy and edit the existing examples.sites.php), which should be stored in the /sites directory.

For Drupal 6 you can try applying the multi-site aliasing patch.

As a last ditch effort (not best practice) you can also try editing the database (e.g. system and files tables) to change the file paths to reflect the new path.

  • Wow Rider_X you're awesome. It took me a bit to figure out exactly how to use the patch and sites.php, but I got it working. Never would have found the patch without your help. Thanks! – Webdrips Oct 16 '12 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.