Make WordPress Core

#20916 closed defect (bug) (fixed)

Network Enable theme after installation doesn't work

Reported by: duck_ Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.4
Component: Themes Keywords: has-patch commit
Focuses: Cc:


Network enabling a theme after installation, see #18468 and [18569], doesn't work in 3.4. This is because the redirect was switched back to use the referer in [20151].

Network Enabling child themes just doesn't work, and never did as far as I can tell, because of the use of $template instead of $stylesheet. Related: #20914.

Attachments (2)

20916.diff (2.0 KB) - added by duck_ 23 months ago.
20916.2.diff (2.0 KB) - added by nacin 23 months ago.

Download all attachments as: .zip

Change History (9)

duck_23 months ago

comment:1 duck_23 months ago

Note that the act of network enabling the theme does actually happen (for non-child themes), but you're redirected back to the install page which attempts to reinstall the theme and gives an error message because it's already installed.

For child themes it doesn't work and you're redirected to a nonce failure.

comment:2 follow-up: nacin23 months ago

You could network enable child themes just fine, just not from the upgrader. And the upgrader only started supporting child themes in 3.4.

With regards to the impetus to switch back to referer in [20151] — I'm sure I noticed it improved the UX a bit (returning to the same filter page, or same paginated page, etc.), but clearly, the status quo in [18569] and 20916.diff at least doesn't break, for the moment.

comment:3 nacin23 months ago

  • Keywords commit added

comment:4 in reply to: ↑ 2 duck_23 months ago

Replying to nacin:

You could network enable child themes just fine, just not from the upgrader

Indeed. I should have made it clearer that the context for everything I was talking about was from the post-installation screen.

comment:5 nacin23 months ago

  • Owner set to nacin
  • Status changed from new to reviewing

nacin23 months ago

comment:6 nacin23 months ago

20916.2.diff provides the better experience while not breaking the uploader. Tested.

comment:7 ryan23 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In [21062]:

Use the stylesheet rather than the template to create the network enable theme nonce. Fix network enable redirect following theme installation. Props duck_, nacin. fixes #20916

Note: See TracTickets for help on using tickets.