Make WordPress Core

Opened 11 years ago

Last modified 5 years ago

#23709 assigned enhancement

Relax wildcard restrictions for populate_network() when installing in subdomain mode

Reported by: rinatkhaziev's profile rinatkhaziev Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Upgrade/Install Keywords: needs-patch
Focuses: multisite Cc:


I ran into the issue while trying to use wp-cli install-network command with --subdomains support.

Underlying core issue is that populate_network is trying to check if wildcard subdomain is accessible. This makes sense for large networks, but might not work with certain setups, or not needed for small sites.

Proposed solution is to add extra arg for populate_network() $wildcard_check with default to true. See attached patch

Attachments (1)

subdomain_wildcard.patch (1022 bytes) - added by rinatkhaziev 11 years ago.
Proposed patch for the ticket

Download all attachments as: .zip

Change History (15)

11 years ago

Proposed patch for the ticket

#1 @nacin
11 years ago

I don't see a problem necessarily with this patch. But, WP-CLI should check the returned WP_Error code and treat no_wildcard_dns as a warning, not a failure. If you look in wp-admin/network.php, we do the same.

I think it is probably time to turn populate_network() into an array of arguments.

#3 @rinatkhaziev
11 years ago

Thanks for wp-cli patch Andrew. I think this additional parameter still would be good for other edge cases.

#4 @nacin
11 years ago

I wonder if this wildcard check should be pulled out of populate_network(), and instead be done directly in wp-admin/network.php. (Wrapped into a function for wp-admin/includes/ms.php.) It is more of an application flow check than something that should be done at the schema/upgrade API level.

#5 @SergeyBiryukov
11 years ago

  • Version changed from trunk to 3.5

#7 @jeremyfelt
11 years ago

  • Keywords has-patch removed
  • Milestone changed from Awaiting Review to Future Release

Sounds like we may really have two tickets here.

  1. Start supporting an array of arguments in populate_network(), in the process possibly addressing the original issue brought up in this ticket.
  2. Move the wildcard subdomain check out of populate_network().

#8 @jeremyfelt
10 years ago

  • Component changed from Multisite to Upgrade/Install
  • Focuses multisite added

#9 @chriscct7
9 years ago

  • Keywords needs-patch added
  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Closing as maybelater. Complete lack of interest on the feature on the ticket over the last 2 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch).

#10 @jeremyfelt
9 years ago

  • Milestone set to 4.4
  • Resolution maybelater deleted
  • Status changed from closed to reopened

Expressing some interest. :)

Let's poke at the idea of moving the wildcard DNS check out of populate_network(). It is a core workflow thing.

#11 @wonderboymusic
9 years ago

  • Owner set to jeremyfelt
  • Status changed from reopened to assigned

#12 follow-up: @DrewAPicture
9 years ago

@jeremyfelt: And update on a new patch for this per comment:10?

#13 in reply to: ↑ 12 @jeremyfelt
9 years ago

  • Owner jeremyfelt deleted

Replying to DrewAPicture:

@jeremyfelt: And update on a new patch for this per comment:10?

I started digging a bit, but we still need a patch.

#14 @jeremyfelt
9 years ago

  • Milestone changed from 4.4 to Future Release

There's probably a bunch of fun to be had in populate_network(). Let's keep looking at this for 4.5.

Note: See TracTickets for help on using tickets.