can't login on subsite. Multi-domain AND Domain Mapping together

Hi!

I have an issue with both plugins and I confirm I use the latest version of both, of sunrise, and of WordPress

I tested this on a live site, and on a test site, with several different versions of sunrise.php, tested with and without single signon, cleared cookies, changes browser, etc...

I cannot connect to the dashboard with a subsite attached to a secondary domain, but only when domain mapping plugin is active, and the said login is NOT on a mapped domain

->> can login :
mainsite1.com/wp-admin
subsite.mainsite1.com/wp-admin
subsitemapped.com/wp-admin (mapped on a subsite.mainsite1.com OR subsite.mainsite2.com <- must check)

->> cannot login:
subsite.mainsite2.com/wp-admin (where mainsite2 is a additional domain entered into multi-domain, and pointing to the same install folder in my hosting panel)

I don't know if the issue was there before the new versions of those plugins, because I never had until now a customer on a secondary domain, without mapped domain, I need that now that a new customer want to keep her old site on her current hosting with her domain name, until her site is ready.

I talked the other day in the chat with one of your support staff, but after test, I told him it was working on a second test site, but it was my mistake, it was working on
subsite.mainsite1.com/wp-admin
but not on
subsite.mainsite2.com/wp-admin

on my live site, I have Pro Site, but on my other test, there is no Pro Site, and only a few other plugins.
the live site is on a dedicated IP, the other one on shared IP.

thank you very much in advance for your help
Have a great day
Patricia

  • Alexander
    • DEV MAN’s Mascot

    Hi @Patricia,

    Are you using the latest version of Multi Domains and Domain Mapping? If you are, there are some changes that would make Multi Domains setup sunrise.php automatically.

    Here's how this would work

    1. Install Domain Mapping.
    2. Move sunrise.php from domain mapping
    3. Install Multi-Domains
    4. Multi-Domains will automatically update the sunrise file for you.

    Regarding being unable to login at each site. Can you give examples of your sites themselves? Or could you elaborate on what it's working. For example, do you get any error messages?

    Best regards,

  • Patricia BT
    • Connector

    Hi Alexander and thank you for your answer

    - yes I have the latest versions.
    - yes I just did again the 4 steps in the order you mention above

    I prefer not to say the sites name publicly until it's ready and launch, but I can send you an admin account

    and the error message is about the cookies

    actually, the issue is the same as in that post (did some research before to ask)
    https://premium.wpmudev.org/forums/topic/avoiding-doom-cant-login-to-multi-domain-subsite-admin
    = can't login with a subsite on a secondary domain
    but what's strange is that user said multi-domain version 1.2.1 solved it? but that thread is 5 months old, and that was the old way to add multi domain in the mu-plugins folder, so...

    Thanks and Regards :slight_smile:

  • Patricia BT
    • Connector

    YES! YES! YES! YES! YES! YES! YES! YES! YES!
    I had to find a reaction gif to show you how I feel currently:
    http://www.gifbin.com/981187

    The sunrise.php couldn't update itself because I have installed the plugin, and moved that file via ftp, so it had my ftp username and was non writable, default to 644 file permission. Once I set to 666 file permission, I saw it updated when I deactivated and reactivated multi-domain again!!

    As I have kept several versions of sunrise.php during all my tests (old and new, from one plugin alone, and the other, etc) I saw it was the first time the file grew over 3kb, so it was a totally new sunrise.php. And all my login problem vanished!! ALL OK NOW :slight_smile:

    so maybe this is worth to mention somewhere on your multi-domain usage page near the "It is also no longer necessary to manually update the sunrise.php file as that is now done automatically. :slight_smile:" that it can update the file only if it has correct file permission or file owner, I guess I'm not alone with that...

    Anyway, I'm so glad, I can now move forward and allow people to register soon...

    So many thanks to you Alexander, as well as Jack the other day in the chat.

    Have a great day!

  • Patricia BT
    • Connector

    Hi

    As it seems a lot of people have the same issue, I will answer in some of the similar posts, explaining them about the file that couldn't update itself, and pointing here.

    so the thing is to have that wp-content/sunrise.php WRITABLE by WordPress when it updates either one or the other of those 2 plugins.

    If it's of any help, here attached is the sunrise.php file which works. It holds the code for both of the plugins if you use them at the same time. Of course it will change with next versions but for now it's for :

    - Multi-Domains 1.3.1
    - Domain Mapping 4.1
    (done on Dec 2th, 2013)

    If you download it and upload to wp-content, you must rename it to sunrise.php
    Best is if it's done automatically on your server, but in case you want to compare files.

    All the Best
    Patricia

    EDIT : oops the attachment was not authorized by the system even though it's a txt file, so here it is on my Dropbox
    https://www.dropbox.com/sh/bhqvjqlqwmxujf2/susGrb3xAw/Code
    (I hope I'm allowed by WPMU to link to code?)

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.