[wp-trac] [WordPress Trac] #32308: WP Multisite: Can't add new site.

WordPress Trac noreply at wordpress.org
Wed May 27 07:06:52 UTC 2015


#32308: WP Multisite: Can't add new site.
--------------------------+------------------------
 Reporter:  thesun2012    |       Owner:  chriscct7
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Formatting    |     Version:  4.2.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------

Comment (by tvape):

 I had the same errors yesterday. The solution is very easy. Always define
 DB_COLLATE in wp-config.php, that would correspond with DB_CHARSET. Do not
 leave it empty.

 My working setttings are:

 define('DB_CHARSET', 'utf8mb4');
 define('DB_COLLATE', 'utf8mb4_general_ci');

 Before, when DB_COLLATE was empty and DB_CHARSET was uft8mb4 (set
 automatically by installation routine), I received the above mentioned
 error messages. It is caused by not being able to create new tables for
 the new site (site nr. 2 in this case):

 wp_2_terms
 wp_2_term_taxonomy
 wp_2_term_relationships
 wp_2_commentmeta
 wp_2_comments
 wp_2_links
 wp_2_options
 wp_2_postmeta
 wp_2_posts

 And than the consequent SELECTs cannot get the desired values.

 Problems are caused by function init_charset() in wp-db.php, line 725. I
 think the order of checking and setting charset and collate is not very
 logical. It should be refactored.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32308#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list