0

I asked this question on stackoverflow earlier, not realizing this site existed. Seems that this would be a better place for it.

In a nutshell, I've restored an existing drupal 7 site under the public_html/migrated_site folder on my hosted site.

When I browse that URL however I'm getting errors from jquery that the Drupal object doesn't exist, and all my links and images point to public_html/migrated_site/sites/someothersite...

..where someothersite is the name of the old subdierctory under public_html on the prior host.

I changed my settings.conf values to point to the migrated MySQL database, and that bit appears to have worked, in that the site is coming up, albeit unstyled and with the above jQuery and links errors.

However I'm not sure what could be going on above? I've tried a few RewriteBase settings in .htaccess in both public_html and public_html/migrated_site (particularly, adding RewriteBase /~hisusersite/migrated_site) but nothing seems to have made a difference.

1
  • In addition to the RewriteBase, you'll want to set $base_url in settings.php. Note that for RewriteBase, it's relative to the URI, so you'd just use RewriteBase /migrated_site , and $base_url = '//whatever.com/migrated_site'; Commented Apr 20, 2015 at 20:07

1 Answer 1

2

The Drupal JS object not being defined is a symptom of it not loading core JS files. His previous site probably enabled JS aggregation that places the aggregated file in sites/someothersite/files/XXX.js. The same goes for the missing images. Have you copied over sites/someothersite/ from the previous host?

It sounds like sites/someothersite/settings.php was what his original host was using and configured for DB & files. Since you're now viewing the site on gator1111.hostgator.com Drupal is using sites/default/settings.php.

This primer on drupal multi-site settings might help to also explain what's going on.

2
  • Thanks for your help. The 'CSS/JS aggregated file gzip compression' setting in settings.php is set to 'off' and I did copy all the js files (in files/js) from the previous host over to this one. I also renamed the folder from 'migrated_site' to 'default' but that didn't change anything.
    – larryq
    Commented Apr 5, 2015 at 23:56
  • 3
    Another thing I would check is .htaccess rules for RewriteBase, since you're moving the site to a subdir. Drupal gets wonky sometimes when you do that. Try setting it to /~hisusername/migrated_site
    – Shawn Conn
    Commented Apr 6, 2015 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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