1

I've been trying to figure this out for a while on this one particularly large site.

Every single URL on every page and menu, even the admin menu as the wrong url. I've tried this with WAMP, MAMP, Vagrant, Docker and Docksal with the same results.

A better explanation: I'd expect all urls to be what I've setup on my local machine as the base. Like mysite.loc, or for docksal, mysite.docksal.

But when I pull the repo for this site and set it up, then load it...all urls are the production urls. Anything I click on goes to production. All submit buttons goto production. Almost like they are saved in the DB, but the definitely aren't.

I've tried setting the base URL. That doesn't work.

I've turned off all the modules, both contrib and core. That doesn't work.

I've changed themes. That doesn't work.

It's something within the filesystem of this site but I'm not sure where to look at this point. Probably a hack someone put in somewhere.

Any thoughts of where to look?

9
  • What steps did you take to set up the website from production to local? This shouldn't have to do with your stack, themes and modules. Focus on your installation. .htaccess, settings.php, etc. Also, are you using drush? In my local version of production, I didn't have to set a base URL. Maybe you need to comment out the base URL.
    – Christia
    Commented Sep 27, 2017 at 4:32
  • This is also worth mentioning, but did someone build the menu using full URLs?
    – Christia
    Commented Sep 27, 2017 at 4:35
  • Can you try doing a directory search on your project with the production URL or part of production URL first?
    – KiranD
    Commented Sep 27, 2017 at 6:28
  • @Christia Those are good guesses, but putting full URLs in the main menu wouldn't explain all system and admin menu URLs and tabs all pointing to the production site. Steps I took were I pushed all production files to a git repo. Setup my local environment, pulled all the files, pulled the database from production to local. Totally different htaccess and settings.php right now since I'm using docksal. I am using drush via docksal. I have never set the base URL before, but I thought I would mention that because other post mentioned to try it. Commented Sep 28, 2017 at 0:23
  • @KiranD Tried it. No luck. There isn't anything in the filesystem that has hard coded production URLs. Maybe something in the DB? I'm not even sure where to look there though because it's got a ton of tables and custom fields. Maybe in the variable table? Commented Sep 28, 2017 at 0:24

1 Answer 1

1

I found the issue.

If you're using the module "Domain Access", the uninstall hooks do not work properly (or at least they didn't on our site).

You'll need to go into your DB and change the domain settings after you've disabled your module.

All of the Domain module tables that have your production (or old URL) in them need to be changed. Removing those tables will likely corrupt your DB and make the site unusable.

1
  • Agreed. "Domain Access" module is tricky when you switch the site between environments.
    – KiranD
    Commented Sep 29, 2017 at 1:03

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.