The MU forums have moved to WordPress.org

Bug in Wordpress mu: Can't login with newly created user (8 posts)

  1. wiscalico
    Member
    Posted 10 years ago #

    Played around with Wordpress mu r1616 today (a pre 2.7 I guess) and found some weird behavior.

    Made a fresh install on http://domain1.com/wp/ (Using Sub-domains)

    Created a new user and tested that I could login with this user on:

    http://domain1.com/wp/wp-login.php

    Logged in as admin again and created a new blog. The new blog would use the domain domain2.com.domain1.com so I changed that to just being domain2.com and the path is still wp. I test that my new blog appears on the address - which it does:

    http://domain2.com/wp/

    Now I add my previously created user to the new blog and removes it from the old blog

    First I try to login on the new blog with some random made up user and I'm told 'Invalid username.' then I try to login with my user with a wrong password and I'm told: 'Incorrect password.'

    Last I try to login with the user and the right password and I'm just redirected to the login form with no error message like this:

    http://domain2.com/wp/wp-login.php?redirect_to=http%3A%2F%2Fdomain2.com%2Fwp%2Fwp-admin%2F

    Is Wordpress just not capable using 2 different domains or is this a bug?

  2. andrea_r
    Moderator
    Posted 10 years ago #

    Yeah it is, but you need to use the Domain Mapping plugin.

  3. wiscalico
    Member
    Posted 10 years ago #

    Domain Mapping plugin doesn't seem to work with 2.7

    I think I fixed this myself... not with changes in the code but manuel adding/changing 2 things in the database.

    First I added a new row in the table 'wp_site' with my domain2.com
    Then I altered a row in the table 'wp_blogs' where I set the site_id for my domain2.com to the id just generated in with the new row in 'wp_site'.

    Now I can login... though I still need to play around and test stuff.

    I would seem that wordpress actaully supports diffrent domains but the admin interface cant save the right values.

  4. andrea_r
    Moderator
    Posted 10 years ago #

    Weird, I'm using it on a trunk version of 2.7. Sure you installed it right?

  5. wiscalico
    Member
    Posted 10 years ago #

    I tried installing the plugin again and I can now see that my problem was finding the plugin in the web interface after install. Anyways I tried it now but found my own way of doing it more to my liking :)
    Domain Mapping is using an extra table in the Wordpress database - Is this really necessary?... or perhaps a leftover from previous versions of Wordpress MU?

    Well... I just like playing around with this :)

    Anyways after doing the trick from my last post, the blog attached to domain2.com would be without a site admin. This means your wouldn't be able to attach new users to this blog. There would be no edit link to it from the web interface.

    This is how you make the admin user "Site Admin" for domain2.com as well. This means when you log in to domain2.com as admin you will be able to do all the "Site Admin" stuff on blogs attached to domain2.com. Just insert the following row in the table wp_sitemeta, example:

    INSERT INTO wp_sitemeta ( site_id , meta_key , meta_value ) VALUES ('2', 'site_admins', 'a:1:{i:0;s:5:"admin";}');

    The number two (2) is a reference to the domain (site_id) you created the table wp_site. You will ofcourse be able to do this for several domains and/or users :)

  6. andrea_r
    Moderator
    Posted 10 years ago #

    You must be using the Multi-Site manager, because I'm using Donncha;s domain mapping plugin and I get a Site Admin menu on mapped domains.

  7. imgoel
    Member
    Posted 10 years ago #

    Hi andrea,
    yesterday i have upgraded my WPMU installation on Goelji.com. i was logged in at that time but, since morning i am facing some crazy problems.
    1. the login page is not working.
    2. the logo above login form is pointing to a invalid web address.
    3. the signup page is not showing up.

    Please, can you help me out?

  8. imgoel
    Member
    Posted 10 years ago #

    solved the problem, i overlooked the new settings in new wp-config.php file.
    the default blog domain and its path needed to be set manually in wp-config.php file.

About this Topic

  • Started 10 years ago by wiscalico
  • Latest reply from imgoel