Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#41807 closed enhancement (duplicate)

Save Main site id as a network option

Reported by: spacedmonkey's profile spacedmonkey Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Description

In #29684 the idea of saving the main site id as a network option was floated. It has a number of briefs, including.

  • Ability to change main site id
  • Easy to find main site id using database query
  • Result is cached and never needs to be looked up.

Attachments (1)

41807.diff (706 bytes) - added by spacedmonkey 7 years ago.

Download all attachments as: .zip

Change History (3)

@spacedmonkey
7 years ago

#1 @johnjamesjacoby
7 years ago

When will the domain and path of the main site ID not match what’s in wp_blogs?

Doesn’t it put the cart before the horse to store this site ID in network meta, because wp_blogs needs to get queried to know which site and network to load anyways, and the network knows what it’s main site is?

#2 @jeremyfelt
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Sorry to cut this off, and thanks for being proactive @spacedmonkey, but I think this ticket can be considered a duplicate of #29684, where the conversation about how best to determine the network's main site ID has been happening. That needs to be resolved before a ticket like this can be effective. And, if we do end up storing it as a network option, then the patch on #29684 should cover that initial storage as well.

@johnjamesjacoby There's a bit of back and forth around this on #29684. Can you chime in there?

Note: See TracTickets for help on using tickets.