Login for WPMU site and sub blogs

I have a WPMU installation (with buddypress)

I log into the my main WPMU install.
I then go to my sub blog and I have to log into that too!

I have to do this even when I log in as Admin to my WPMU install and the Admin is the same Admin that is set up as the admin of the sub blog.

I'm sure this is not normal and I have a feeling this has only started happening since using domain mapping for the sub blog in question.

Help?

  • hkcharlie
    • Site Builder, Child of Zeus

    I will have a play with that, but I must admit the thread looks like it is full of speculative answers.
    Has anyone managed recreated the problem and tried to fix it?

    I had a quick play with the ajaxlogin plugin that was suggested and that didn't appear to work.

  • hkcharlie
    • Site Builder, Child of Zeus

    mason james: I don't know what has changed, but something has and it appears to be working again.
    If I can figure it out what it was that changed, then I'll let you know.

    *Sorry - I lied, I thought it was fixed but it's not. I must have previously been logged into one or the other.*
    I look forward to hearing from you.

  • hkcharlie
    • Site Builder, Child of Zeus

    I have tried Barry's
    "If you are having issues with the cross domain logins, can you check or post your wp-config.php files (minus the database connection and secure cookies bits) - entries we are looking for are defines with keys of:
    DOMAIN_CURRENT_SITE
    PATH_CURRENT_SITE
    SITE_ID_CURRENT_SITE
    BLOG_ID_CURRENT_SITE
    and
    COOKIE_DOMAIN

    If you have any of these, then you can usually just comment those lines out, if you're unsure then let us know and we can advise. "

    and like the last guy said, it doesn't work.

    Can someone tell me whether anyone is looking into this!?!

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Apologies for the lack of a conclusive answer. Could you try disabling the domain mapping for the blog that's giving you trouble and see if you are then able to log in correctly? At least then, we'll know for sure it has to do with the domain bits. We can continue trouble-shooting from there. :slight_smile:

    Again, I'm unable to recreate this issue so it's a challenge to come up with a solution. Thanks again for your patience.

  • hkcharlie
    • Site Builder, Child of Zeus

    Yes, it's all confirmed.
    I delete the new URL that is setup in the domain mapping plugin within the sub blog and when I log in, I am able to move between the sub blog and the main blog seemlessly and without having to log into each one seperately.

    I add the domain I want to use, to the domain mapping plugin and I am required to log into each blog seperately and cannot move between the sub blog and the main site seemlessly.

    Before you ask me "are you sure?"
    Yes, I am sure.

  • Aaron
    • CTO

    Barry may correct me, but i'm pretty sure the domain mapping plugin is not supposed to log you in to a mapped domain if you login first to the main site. It's not possible with the way web browsers work and send cookies. Thats how it works for me.

    What it should do though is if you login to the mapped domain, it will also log you into the main site. Most of us use the setting to keep the admin area unmapped though, so it's not an issue then.

  • hkcharlie
    • Site Builder, Child of Zeus

    "What it should do though is if you login to the mapped domain, it will also log you into the main site. "

    Yes, I believe I have explained three times that this is my problem and that this is not what is happening for me.
    So suggestions for fixing this problem would be very much appreciated!
    (17 days for a straight answer to a problem which you appear to understand, is just a little frustrating!)

  • Artsblurt
    • Flash Drive

    @hkcharlie - have you tried deactivating the domain mapping to see if that is possible the cause of the problem. You may also have a clash or issue with another plugin.

    I am clutching at straws here but what browser are you using? - are any of your settings possibly causing this problem? Do you have the same problem using a different browser.

  • Mason
    • DEV MAN’s Sidekick

    Hiya hkcharlie,

    Sorry you don't feel this has been answered. I'm trying to track down what's happening here. ;D

    In the first post you reported:

    I log into the my main WPMU install.
    I then go to my sub blog and I have to log into that too!

    Aaron has since responded:

    the domain mapping plugin is not supposed to log you in to a mapped domain if you login first to the main site. It's not possible with the way web browsers work and send cookies. Thats how it works for me.

    Aaron also said:

    What it should do though is if you login to the mapped domain, it will also log you into the main site. Most of us use the setting to keep the admin area unmapped though, so it's not an issue then.

    This is different (sort of opposite or reverse) from the initial report on this thread. It is possible to log in to a mapped domain and be automatically logged into your Main site. It is not possible to log in to your main site and also be automatically logged in to a mapped domain.

    It's an important distinction and I want to make sure we're on the same page so we can correctly address the issue :smiley:

    Now, with that sorted. If you are having trouble with the former (logged into mapped domain, but not automatically into the main site) we can troubleshoot some things:
    What are your Administrative Mapping settings in Network Options (Super Admin>Options)?

    Are you using Supporter in addition to domain mapping?

    Get back to us with this and we'll work to get this resolved. Thanks!

  • hkcharlie
    • Site Builder, Child of Zeus

    I see you read Aarons replies, but did you read my replies?

    Yes Aaron said "What it should do though is if you login to the mapped domain, it will also log you into the main site."
    and like I said before, it does not do this for me.

    What are your Administrative Mapping settings in Network Options (Super Admin>Options)?
    I have tried it with all three settings "domain entered by user" (my prefered), "mapped domain", "origional domain". None work.

    Are you using Supporter in addition to domain mapping?
    It's installed, but I am not at present using it, is there a known conflict?

  • hkcharlie
    • Site Builder, Child of Zeus

    Yes, 2 weeks ago I read Barry's idea, commented out those lines and it didn't work, like it didn't work for the guy that wrote the origional question in the other thread.

    You can see where I posted this answer in the attachment.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Re-reading this thread:

    What versions of WordPress, BuddyPress, and the domain mapping plugin are you using?

    Do you have WordPress installed at the root or is it in a different directory?

    Again, this is rough because we aren't able to re-produce the error. I have a few installs with the domain mapping plugin installed and haven't experienced these issues. Thanks for your patience as we get this sorted. :smiley:

  • Barry
    • DEV MAN’s Mascot

    Hi Hkcharlie
    In your original post your say:

    I log into the my main WPMU install.
    I then go to my sub blog and I have to log into that too!

    Yet further down you say:

    "What it should do though is if you login to the mapped domain, it will also log you into the main site. "
    Yes, I believe I have explained three times that this is my problem and that this is not what is happening for me.

    Note, these are two completely different scenarios - the first above, is correct behaviour in the current version of the plugin - the domain mapping plugin can not know at the time you login to the main site, which of possibly 100's of domain mapped blogs you also want to login to - note I'm exaggerating with the 100's, but you could have a few blogs and it would hit the performance of your site quite dramatically on every page load to log you into everything.

    The second one, is an issue. As when you login to your domain mapped blog it should identify and log you in to the main site.

    To find out what's happening we need to do the following:
    1. Comment out all the lines already identified above from your wp-config.php - leaving even one of these makes wp bypass the bits of functionality we need.
    2. Clear out the cookies for your main domain and the mapped domain from a browser so that we can test.
    3. Go to your domain mapped site and login, navigate around the admin area a little bit to make sure the domain mapping is working correctly.
    4. View the source of a page (dashboard is fine) *or* more helpfully if you are using firefox and have firebug installed, have a look at the net tab and refresh a page.
    5. Look for a css file being accessed from your main domain with a very weird name (I can't tell you the name because it's randomly generated) but as an example:

    If you are viewing a page on your domain mapped site with has the domain freddysworld.com (and your main site is freddysplace.myworld.com) then you will see a css file accessed like:

    http://freddysplace.myworld.com/397388c7969f4fbac826f7b8db5100f0.css?build=20100807

    The filename will change with each page load - so it's the format that you are looking for.
    If you are using firefox and firebug, then check the colour and status of the line with this file - if it's red then we have a problem with permalinks on your site. if it's status is 304, then we have a problem with caching on your server or browser. if it's 200 then it is a different issue. if it doesn't exist then your domain mapping plugin isn't installed correctly.

    If you can let me know the details of the steps above, then we can see if we can track down the issue.

    Domain mapping cross-domain logins are tricky to debug because we are attempting something that the security rules of your web-browser are designed to prevent (cookies by default can only be stored and read on the domain they are created).

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.