WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#20090 closed defect (bug) (fixed)

Can't edit themes with '&' in the name

Reported by: trepmal Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

If a theme has an ampersand in the name, it cannot be edited through the WordPress theme editor. I tested with a simple child theme:

/*
Theme Name: Amper & Sand
Template: twentyeleven
*/

(doesn't matter if the ampersand is encoded or not)

If that theme is chosen from the 'Select theme to edit' select box, you are presented with The requested theme does not exist. (via wp_die())

Or worse, if it is the active theme you can't even access the Theme Editor, as you are immediately presented with the same message.

Attachments (1)

theme-editor.diff (810 bytes) - added by trepmal 2 years ago.

Download all attachments as: .zip

Change History (7)

trepmal2 years ago

comment:1 kurtpayne2 years ago

  • Cc kpayne@… added

I tested this. I can confirm the problem and the patch works.

comment:2 trepmal2 years ago

  • Keywords needs-patch added; has-patch removed

Problem returned (see #20103). Patch no longer works. #blamenacin

comment:3 nacin2 years ago

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

The theme editor needs to be rewritten to use wp_get_themes() instead of get_themes(), which will change it from being keyed by theme name to by stylesheet. This will fix this.

comment:4 kurtpayne2 years ago

Tested this without the patch on 3.4-beta1. Cannot reproduce. Looks like the wp_get_themes() rewrite fixed it.

comment:5 nacin2 years ago

  • Milestone changed from Awaiting Review to 3.4
  • Resolution set to fixed
  • Status changed from accepted to closed

Yes, this is definitely fixed.

comment:6 kawauso2 years ago

Related/duplicate (slightly broader): #16507

Note: See TracTickets for help on using tickets.