Opened 2 years ago

Last modified 2 years ago

#16568 new defect (bug)

Network install disables site when blog_id is not 1

Reported by: wpmuguru Owned by:
Priority: normal Milestone: Future Release
Component: Multisite Version: 3.0.5
Severity: normal Keywords: has-patch
Cc:

Description

This is an edge case and only occurs when MySQL is configured to skip numbers in auto number fields.

The network install inserts the blog record and allows MySQL to assign the blog_id. The blog prefix logic in wpdb depends on the blog_id of the main blog being 1.

The manual fix for this is to edit the DB and change the blog_id of the main blog to 1. Between being an edge case and a relatively easy fix, this isn't severe, imo.

Forum thread: http://wordpress.org/support/topic/database-error-when-enabling-mutlisite

Attachments (2)

16568.diff (774 bytes) - added by wpmuguru 2 years ago.
hard code blog id 1
16568.2.diff (839 bytes) - added by wpmuguru 7 months ago.
16568.diff refreshed for 3.5

Download all attachments as: .zip

Change History (4)

hard code blog id 1

The alternative to hardcoding the blog id of 1 is to warn the user that they have to edit the DB. A more elaborate solution would be to add a constant with the blog id and use the constant in wpdb. That may create more trouble than the current issue is.

I'm proposing this because it is the simplest solution.

  • Keywords has-patch added

16568.diff refreshed for 3.5

Note: See TracTickets for help on using tickets.