Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 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:


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 9 years ago.

Download all attachments as: .zip

Change History (7)

9 years ago

#1 @kurtpayne
9 years ago

  • Cc kpayne@… added

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

#2 @trepmal
9 years ago

  • Keywords needs-patch added; has-patch removed

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

#3 @nacin
9 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.

#4 @kurtpayne
9 years ago

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

#5 @nacin
9 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.

#6 @kawauso
9 years ago

Related/duplicate (slightly broader): #16507

Note: See TracTickets for help on using tickets.