I am merging a website from one dev subdomain to its own install. I got everything to merge over just fine except all of the site images using image cache are trying to point toward both the old and new URL??? The URL is at http://lasvegascostumes.umbrin.com ..Any Ideas??

Thanks in advance for any help with this!

Comments

shady_gun’s picture

clear cache in performance once ....

chadmkidner’s picture

Already done that. Doesn't fix the problem.

sammyg’s picture

How can they be pointing at two URLs at the same time? What exactly do you mean?

chadmkidner’s picture

http://lasvegascostumes.umbrin.com/?q=start-business Go here and see what I mean.. Its wierd but I guess somehow instead of changing the URL in the database when I changed the domain it just added the new one on top of the old..

chadmkidner’s picture

Still no luck on this any ideas?

chadmkidner’s picture

<img src="http://lasvegascostumes.umbrin.com/?q=system/files/imagecache/full-view/sites/americancostumes.umbrin.com/files/elvis_0.jpg" alt="" title="" class="imagecache imagecache-full-view imagecache-default imagecache-full-view_default">

This is what the code looks like...?

sammyg’s picture

Sounds like your files settings are incorrect. Have you checked settings for imagecache and Drupal file directories?

chadmkidner’s picture

Yes, files directory is set to sites/default/files and i'm not aware of any setting in imagecache that can effect the file url?

I did check in the database and it looks like imagecache used the old file setting of sites/subdomain.domain/files when saving the image path for each image? So now when it looks for the image path it uses both the new file path as well as the one saved with each image... If I re upload the image through CCK it works fine but than I have 2 of every image seems like there should be an easier way to fix this problem.

sammyg’s picture

Have a look at this:
http://drupal.org/node/177934

Particularly:

After that it still toke me some time to find out that there's another .htaccess file in the 'files' subdirectory. That one was the cause: it was an older version with 'RewriteEngine off' in it... Deleting that file and letting drupal recreate it was enough to make the whole imagecache system work.

...and more generally:
http://drupal.org/node/224913

You could try running a query to update the offending imagecache database rows (on a development copy of your site, of course).

Also, how about the Drupal root directory setting in settings.php?

Hopefully the .htaccess thing may sort you out.

chadmkidner’s picture

Checked all of these ideas and thank you for your help. None of these solutions have fixed the migration issue and I'm begging to wonder if the issue is in cck's imagefield rather than imagecache.. It seems as if imagefield has saved the previous subdomain as part of the images when uploaded instead of ONLY the image name. ie sites/subdomain.domain.com/files/image.jpg instead of just image.jpg and let drupal handle the rest? So everywhere there is an image uploaded through imagefield they do not display because they are being looked for in sites/default/files/sites/subdomain.domain.com/files/image.jpg..

Is this problem common and/or have a solution? I would think imagefield would allow for domain migration.. Any ideas?