Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#27869 closed defect (bug) (fixed)

Theme install return wrong install_url on network admin

Reported by: hirizh's profile hirizh Owned by: nacin's profile nacin
Milestone: 3.9.1 Priority: normal
Severity: normal Version: 3.9
Component: Themes Keywords: has-patch
Focuses: administration, multisite Cc:

Description

When installing a theme on network admin, the install url is pointing to wp-admin/update.php?action=install-theme instead of wp-admin/network/update.php?action=install-theme. From here, we'll be redirected to the first site dashboard view after the theme installed successfully.

Its not happening with plugins. So I thought its because the ajax call by the themes query. Maybe it relates to #22589.

Attachments (2)

27869.patch (2.0 KB) - added by ocean90 10 years ago.
27869.diff (545 bytes) - added by nacin 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @ocean90
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.9.1

Confirmed. Introduced by [28126].

@ocean90
10 years ago

#2 @ocean90
10 years ago

  • Component changed from Networks and Sites to Themes
  • Keywords has-patch added; needs-patch removed

@nacin
10 years ago

#3 @nacin
10 years ago

  • Component changed from Themes to Networks and Sites

Well, that could have broken in far worse ways. :-)

I think there is a simpler patch for this. 27869.diff.

network_admin_url() should be used in theme-install.php too (where it is changed in 27869.patch. self_admin_url() is appropriate for pages that work both inside and outside the network admin even when in multisite (like the plugins list table), while network_admin_url() is good for a page that is network-admin-only in multisite. We probably use self_admin_url() in a few places where network_admin_url() is more appropriate, but you only really notice it in odd situations like this, where admin-ajax.php doesn't have context.

#4 @nacin
10 years ago

  • Component changed from Networks and Sites to Themes
  • Focuses administration added

#5 @nacin
10 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 28163:

Theme Installer: Proper redirection and action links post-install in multisite.

fixes #27869.

#6 @nacin
10 years ago

In 28164:

Theme Installer: Proper redirection and action links post-install in multisite.

Merges [28163] to the 3.9 branch.

fixes #27869.

Note: See TracTickets for help on using tickets.