Menu

#37 Bulk Add Fails to Create DB tables for New Users

open
None
5
2010-05-10
2010-03-03
Anonymous
No

I’m experiencing issues when blog admins bulk add a large group of users (say 30 or so users) that don’t already have blogs, so a personal blog is created for the user in addition to adding them to the admin’s blog (as per my settings to do so in LDAP Options). It appears that a number of tables are not being properly created for their personal blog. ie. wp_716_options and so forth for each blog ID. When you try to go to their blog, you just get “The blog you have requested is not installed properly. Please contact the system administrator.” and “WordPress database error: [Table 'wordpress.wp_716_options' doesn't exist]” in my WP error log. It seems that the very first user in the bulk add list has their blog created properly. Every other user in the list, it appears to succeed to the person adding, but actually fails somewhere on the backend.

I am running WPMU LDAP v2.9 and WPMU 2.9.1.1. I have disabled bulk add for now as this does not happen with single user adds.

Thanks

Discussion

  • Aaron Axelsen

    Aaron Axelsen - 2010-03-03

    Is your site configured to auto create a blog for new users?

     
  • Nobody/Anonymous

    Yes.

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-03-03

    That's probably whats going on then. Will take a look time permitting and report back. Thanks for the report!

     
  • Nobody/Anonymous

    Ok. I'll follow this (should have created an account!). Let me know if you need further information to help narrow it down. The bulk add is a very useful feature for us, so hopefully we can figure out what's going on. Thanks.

     
  • Nobody/Anonymous

    Wow. Actually, I was just taking a look at my DB. Seems that NO tables were created for the block of blog ID's where I've noticed the problem. So, this would include:

    wp_xxx_commentmeta
    wp_xxx_comments
    wp_xxx_links
    wp_xxx_options
    wp_xxx_postmeta
    wp_xxx_posts
    wp_xxx_terms
    wp_xxx_term_relationships
    wp_xxx_term_taxonomy

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-03-03

    I don't use the auto create option myself - so i'm sure i just missed that when going through the creation process for bulk add.

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-04-07

    I thought about this and looked at the code some - and then I remembered. This actually is not possible. Currently, wordpress only allows for a single new blog to be created per instance.

    For example, if you try to loop through a list, only the blog for the first user will be created successfully. The rest of the blogs will not be fully created and stuck in a weird state.

    When I get some more time, i'll investigate whether or not this changes in 3.0 - but in the 2.x trunk, I have not been able to successfully make this work.

     
  • Nobody/Anonymous

    So, unless core WP code changes, you will be removing this feature from future WPMU LDAP releases?

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-04-16
    • assigned_to: nobody --> axelseaa
     
  • Aaron Axelsen

    Aaron Axelsen - 2010-04-16

    Well, the feature still works - just not with the auto create blog for new user option. So i'll leave the future there, it will just need to be stated blogs will not be created - and it also needs to not attempt to create them.

    Thanks again for pointing this out!

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-05-10

    The logic has been changed in the svn trunk to not create blogs when using bulk add.

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-05-10
    • status: open --> open
     
  • Nobody/Anonymous

    Ok, thanks. Was wondering as a possible solution (since this feature would be very useful to us)...

    Can the list of bulk adds run each username in the list through the single user add function somehow, thereby allowing the create blog function to work? It might take longer, but is a lot better than entering each username individually.

     
  • Aaron Axelsen

    Aaron Axelsen - 2010-06-18

    I don't know of any way to make that work. I've tried a similiar approach before for a different project, and it didn't work.

    Would it work to add a group setting so that any users who is a member of a specific group would automatically have a blog created during login?

     
  • Nobody/Anonymous

    Are you talking about LDAP group memberships? If so, yes, that would indeed be helpful, but for us, more from the backend 'Add User' function, not upon login.

    We already use the auto-create blog and user for any user in our entire LDAP directory who chooses to login to the service, which always works fine.

    Hmmm.. wondering.. maybe I just need more clarity on what exactly your thoughts are there. Are you suggesting:

    - I've created a blog for someone, who wants to add say 30-40 LDAP users as Authors to their new blog.
    - They would "bulk add" these users, but if any have never logged into the system before, they would be "held" in a group. (If they have an existing WP account, they would get added as Author immediately.)
    - Once any user in that group logs into the system, their user and personal blog will be auto created as per normal, but the system would also add them to the other blog as Author, since they were in that group.

    Am I totally off track? :-)

    I'm thinking it would be easier if the WP code was written in such a way that allowed your Bulk Add function to create more than 1 blog at a time. Hehe.

    Thanks.

     

Log in to post a comment.