Newly mapped site has claimed main admin screen, they are now one and the same

Dear Support,

Short version:

Newly mapped subsite has claimed the admin dashboard of my main site. Logging in as either constantly directs me to newly mapped subsite admin dashboard. Seriously annoying

Long version:

Having finished a client site I successfully mapped their domain name to their subsite on the multisite network. After an hour it successfully resolved. Happy days!

Main site = zizzzitech.co.uk

Sub site = zizzzitech.co.uk/sarah****** which successfully resolves to sarah******.com

Logging into zizzzitech.co.uk as super admin I can see a list of sites in the network. Clicking on zizzzitech opens up the admin dashboard but not for zizzitech, instead it opens up the dashboard for sarah******. The pages, posts images etc on zizzzitech just show me the pages, posts and images for sarah******.

As recomended in a post here on WPMUDEV I removed the following lines from the wp-config file but to no avail. The issue still remains.


define(‘SUBDOMAIN_INSTALL’, false);

define(‘DOMAIN_CURRENT_SITE’, ‘zizzzitech.co.uk’:wink:;

define(‘PATH_CURRENT_SITE’, ‘/’:wink:;

define(‘SITE_ID_CURRENT_SITE’, 1);

define(‘BLOG_ID_CURRENT_SITE’, 1);


I have now tried to modify some of the settings of the domain mapping plugin. The administration mapping question has now been set to mapped domain but I can no longer login to the super admin section of the admin dashboard. I get the following error message.


The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies.


I cannot find and resolve the issue after 5 hours working with my hosting provider and running test after test to try and resolve …… so I’m turning to the WPMUDEV Team and Community.

Thanks in advance and all good wishes,

Will P

  • Tyler Postle
    • Recruit

    Hey Will,

    Hope you’re doing well today and thanks for the thorough description.

    As recomended in a post here on WPMUDEV I removed the following lines from the wp-config file but to no avail. The issue still remains.


    define(‘SUBDOMAIN_INSTALL’, false);

    define(‘DOMAIN_CURRENT_SITE’, ‘zizzzitech.co.uk’:wink:;

    define(‘PATH_CURRENT_SITE’, ‘/’:wink:;

    define(‘SITE_ID_CURRENT_SITE’, 1);

    define(‘BLOG_ID_CURRENT_SITE’, 1);

    Have you put those back? Make sure you put them back if you haven’t already :slight_smile:

    Can you send in your FTP and wp-admin credentials so I can have a closer look at your install? We should be able to narrow down what the issue is here.

    You can also just grant support access instead of sending in the wp-admin credentials, but I will need FTP access to check your config, htaccess, and run plugin checks if needed.

    You can send those privately through our contact form: https://wpmudev.com/contact/

    Select “I have a different question” for your topic – this and the subject line ensure that it gets assigned to me :slight_smile:

    Send in:

    Subject: “Attn: Tyler Postle

    -WordPress admin username

    -WordPress admin password

    -login url

    -FTP credentials (host/username/password)

    -link back to this thread for reference

    -any other relevant urls

    Look forward to hearing back!

    Cheers,

    Tyler

    PS. If you want to access your super admin in the meantime, you can deactivate domain mapping through FTP, that should stop the redirect problem.

  • Elliot Charles
    • The Incredible Code Injector

    Hi Tyler,

    Pleased to meet you and thank you for your response.

    I have reinserted those lines in the wp-config file as per your suggestion and replied with the credentials you were looking for via the secure contact form.

    My fingers and toes are crossed for a great outcome.

    Will P

  • Tyler Postle
    • Recruit

    Hey Will,

    Nice to meet you too!

    Okay, I think I found the issue here. Oddly enough, it’s to do with the Automessage plugin. One of the last places I thought to look, but that’s how the saying goes right? lol.

    Anyways, it was causing a redirect loop – I’ve deleted it now and everything is working as expected.

    Are you using the Automessage plugin for anything? All your settings for it will still be saved in the database, but I’m wondering because if you aren’t then easy enough solution to just not re-install it, but if you are then I’ll ask one of our coding experts to take a closer look at why it might be causing this.

    I troubleshooted it myself, but really can’t say why it was causing this issue – tried to replicate it on my own install and I didn’t get the same problem so it could have something to do with your server setup.

    So, let me know if you do need Automessage as well :slight_smile: otherwise, it should be all good to go.

    Look forward to hearing back. Hope you had a good weekend!

    All the best,

    Tyler

  • Elliot Charles
    • The Incredible Code Injector

    Greetings Tyler,

    You are correct and you are awesome. The site is operating as it should be and I will refrain from using the automessage application. I liked the idea of it but never got round to implementing it fully.

    All good wishes for a great day.

    Kind regards,

    Will P

  • Elliot Charles
    • The Incredible Code Injector

    Hello again Tyler,

    It appears I Usain Bolted and jumped the gun. When logged in as the super admin and navigating to the Sarah*** site in the drop down list of sites, I am presented with “Oops, This Page Could Not Be Found! 404”.

    If I log out of the super admin and then login with the username for the sarah**** site, the relevant parts of the dashboard are presented correctly.

    Would you mind just double checking to see why the super admin cannot see the dashbaord of a particular subsite?

    Thanks as always,

    Will P

    PS – login credentials remain the same

    PS – I have upgraded the site to 4.2.3 (including sites in the network) as I didn’t want to do it while there was an issue in play

  • Tyler Postle
    • Recruit

    Hey Will,

    Well glad we got it almost there :p

    After having another look I think the issue has to do with the custom login page and domain cookies.

    Since you can't safely share login cookies across multiple domains, you need to re-login when navigating to a new domain on your network. Normally you would get redirected to /wp-login but since you have a custom login url it's sending you to a 404 instead.

    Domain Mapping has an "Auto Login" feature via:

    Network Admin > Settings > Domain Mapping

    I've turned it on; however, since it temporarily redirects you to wp-login.php(very briefly) to auto log you in before going to the subsites mapped dashboard it is still giving 404. It does log you in, but not until you've already been redirected to 404.

    The workaround I suggest, and I have implemented on your site so you can see it, is to change the "login mapping" and "Administration mapping" to "domain entered by user".

    This way, when you login from your primary site you can navigate around your network using the original domains – this means you only need to login once and won't see any 404's.

    Your clients can still access the login page from the mapped url and login there. They won't be able to navigate to your primary site admin without seeing a 404, but I'm thinking it's unlikely they would be navigating there anyway?

    **Frontend will always be mapped domain still whether they enter in original domain or not.

    I've attached a screenshot of the options I changed.

    Try it out now and let me know what you think :slight_smile:

    Cheers,

    Tyler

    [attachments are only viewable by logged-in members]