WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#24697 closed defect (bug) (duplicate)

Adding a new site in multisite throw a "could not create site" error

Reported by: crossingsquirrel Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

When adding a new site in a multisite install I always get "could not create site". I experienced this in the italian release of 3.5.2, but the following code is the same for both english and italian releases.

Digging around I found a solution to this:

In wp-include/ms-functions.php, at row 1114 I've changed this

   refresh_blog_details($wpdb->insert_id);
   return $wpdb->insert_id;

into this

   $blog_id = $wpdb->insert_id;
   refresh_blog_details($blog_id);
   return $blog_id;

and it solved the issue, somehow it feels like that $wpdb->insert_id returns 0 after refresh_blog_details is called. And since the function calling insert_blog(...) is testing against a false, without test for type, the 0 trigger the error.

Server info:
CentOs 6.4 64bit
Nginx and php-fpm from epel extra repository
mysql from official repository

Notes:
I don't known if this issue is related to my server being on a VPS cloud but I had the same issue with two different vps solutions from two different companies.

Change History (5)

comment:1 follow-up: SergeyBiryukov12 months ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from blocker to normal
  • Status changed from new to closed
  • Version changed from 3.5.2 to 3.0

Duplicate of #23400.

comment:2 in reply to: ↑ 1 crossingsquirrel12 months ago

Replying to SergeyBiryukov:

Duplicate of #23400.

Mhh didn't found that one while looking around, but how come it hadn't made it to the official release in 5 month? Also it's looks quite blocking to me not being able to create a new site in a multisite config...

comment:3 follow-up: nacin12 months ago

The Italian version of 3.5.2 was built without two fixes, one of which fixed this issue.

comment:4 in reply to: ↑ 3 crossingsquirrel12 months ago

Replying to nacin:

The Italian version of 3.5.2 was built without two fixes, one of which fixed this issue.

I'm suddenly so sorry to being italian but had no choice since customer might end in the admin part in the subsites, it would have been better to install the english one and then the language pack above it.
Thanks for your time, patience and to have explained me what happened.

comment:5 SteveAgl12 months ago

Since sunday the IT distro is updated to the correct SVN milestone this ticket can be closed

Note: See TracTickets for help on using tickets.