[wp-trac] [WordPress Trac] #43306: Creating site using wpmu_create_blog() without / prefixed with $path causes get_id_from_blogname() to fail.

WordPress Trac noreply at wordpress.org
Mon Apr 1 22:10:11 UTC 2019


#43306: Creating site using wpmu_create_blog() without / prefixed with $path causes
get_id_from_blogname() to fail.
--------------------------+------------------------------
 Reporter:  aubreypwd     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.9.4
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  multisite
--------------------------+------------------------------

Comment (by aubreypwd):

 It appears it's because the {{{$site_ids = get_sites(}}} part is returning
 nothing on a subdomain setup when I use {{{get_id_from_blogname}}}. This
 comes up with ID's on sub-dir setup.

 {{{#!php
         $site_ids = get_sites(
                 array(
                         'number'                 => 1,
                         'fields'                 => 'ids',
                         'domain'                 => $domain,
                         'path'                   => $path,
                         'update_site_meta_cache' => false,
                 )
         );
 }}}

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


More information about the wp-trac mailing list