The MU forums have moved to WordPress.org

domain mapping logout issues (12 posts)

  1. dsalon
    Member
    Posted 13 years ago #

    Thank you Andrea... finally I've learned "how" to start a new thread :-)

    Maybe this has been discussed before... I've searched the forums, however didn't find anything...

    of course compliments for the 2.7 beta...

    ok, I have a test installation of wpmu 2.7 (never tested any other versions before) running together with the domain mapping plugin with the following configuration:

    main site: http://wpmudomain.net

    a test blog is activated on: (1) http://test.wpmudomain.net

    now the test blog is domain mapped to (2) http://mappeddomain.net

    the test blog is accessible via (1) and (2), so everything works fine so far...

    I can also login to the administration panel via both addresses (1) and (2) whereby in both cases I will be redirected to the admin panel on (2) http://mappeddomain.net/wp-admin/ ...

    however the "Visit site" link in the admin header always directs to http://test.wpmudomain.net, what's not perfect but would not be that an issue, however the "Log Out" link directs to http://test.wpmudomain.net/wp-login?action=logout&etc... so that logging out from the admmin panel, which is on http://mappeddomain.net/wp-admin/ is not possible and causes the error message:

    You are attempting to log out of test

    Please try again.

    Thank you in advance for any helpful information...

    - ds

    Playing around I found the following quick fixes which appear to be working although little tested:

    In domainmapping.php, I ammended as follows:

    function domain_mapping_siteurl( $setting ) {
    global $wpdb;
    if( is_admin() )
    return $setting;

    into

    function domain_mapping_siteurl( $setting ) {
    global $wpdb;
    if( is_admin() && $_GET['page'] == 'domainmapping')
    return $setting;

    and in admin-header.php on line 107 I amended

    <?php trailingslashit( get_bloginfo('url') ); ?>

    into

    <?php echo get_option('home'); ?>

    the only issue remaining as far as I currently notice is that the prior misredirection remains for the tools.php?page=domainmapping page in the admin panel which appears to be essential for properly managing the mapped domains...

    - ds

  2. dsalon
    Member
    Posted 13 years ago #

    ok... found out that the original settings work better... the above solution merely causes an inverse misdirection when logged in via http://mappeddomain.net/wp-admin/

    I'm new to mu... please excuse any confusion which may have been caused...

    anyway it would be nice to have both login /logout options for mapped domains...

    - ds

  3. London99
    Member
    Posted 13 years ago #

    hi dsalon,
    Did you eventually find a solution to make WPMU 2.7 and Domain Mappings work ?

    I'm having exactly the same issue as you, where the Logout does not work on a Domain Mapped blog.

    Appreciate any info or help
    thanks

  4. johnnytee
    Member
    Posted 13 years ago #

    I modified domain mapping to only map the front side, so if a user goes to http://mappeddomain.com/wp-admin it takes them to http://maindomain.com/wp-admin

    If you want me to post code I can.

  5. London99
    Member
    Posted 13 years ago #

    johnnytee,
    Yes please, that would be great if you could post the code to do this.

    i'm really hoping to get the 'logout' issue fixed

    thanks

  6. Trent
    Member
    Posted 13 years ago #

    @johnnytee that would be extremely useful if you posted your version since I don't want the admin using the mapped domain in any case since I use a wildcard SSL cert on the backend which fails with mapped domain anyways....

    Trent

  7. johnnytee
    Member
    Posted 13 years ago #

  8. London99
    Member
    Posted 13 years ago #

    johnnytee,
    thanks, i'll give it a go and report back.

  9. dsalon
    Member
    Posted 13 years ago #

    Thank you johnnytee... although we encounter a one hit delay for the proper redirection when logging in via the mapped domain, and since we did not find something better, we use your modified plugin as a working and temporarily acceptable solution.

    -ds

  10. London99
    Member
    Posted 13 years ago #

    johnnytee,
    Thanks, I've finally got chance try you modified domian mapping plugin and it seems to be working. I can successfully log out of the blogs admin page.

    appreciate your support.

  11. spherical
    Member
    Posted 13 years ago #

    Just wanted to thank johnnytee for his modification of the domain mapping plugin. It's the solution to my not being able to login when trying to use the original version, which gives a "500 redirect limit exceeded" error in MU 2.7.1.

    Anyone have an idea what would be causing this? I also get it when trying to switch blogs with the Dashboard drop-down menu in the Admin menu plugin. I'd wager it's the same cause; probably from the way I finally got domain mapping set up and working. As usual, the instructions for doing so either can be read more than one way or are missing some crucial bit of information that only someone who doesn't need the instructions would know. Being able to "forget" everything about a subject, while knowing all of it, and write from that perspective is extremely rare.

  12. andrea_r
    Moderator
    Posted 13 years ago #

About this Topic