Make WordPress Core

Opened 14 years ago

Last modified 7 years ago

#23709 assigned enhancement

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

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

Description

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 14 years ago.
Proposed patch for the ticket

Download all attachments as: .zip

Change History (15)

@rinatkhaziev
14 years ago

Proposed patch for the ticket

#1 @nacin
14 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
14 years ago

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

#4 @nacin
14 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
13 years ago

  • Version trunk3.5

#7 @jeremyfelt
13 years ago

  • Keywords has-patch removed
  • Milestone Awaiting ReviewFuture 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
13 years ago

  • Component MultisiteUpgrade/Install
  • Focuses multisite added

#9 @chriscct7
11 years ago

  • Keywords needs-patch added
  • Milestone Future Release
  • Resolutionmaybelater
  • Status newclosed

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
11 years ago

  • Milestone4.4
  • Resolution maybelater
  • Status closedreopened

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
11 years ago

  • Owner set to jeremyfelt
  • Status reopenedassigned

#12 follow-up: @DrewAPicture
11 years ago

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

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

  • Owner jeremyfelt removed

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
11 years ago

  • Milestone 4.4Future 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.