WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#20914 closed defect (bug) (fixed)

WordPress Failure Notice: Your attempt to switch to this theme: “twenty-eleven-child” has failed.

Reported by: emiluzelac Owned by: westi
Milestone: 3.4 Priority: high
Severity: normal Version: 3.4
Component: Themes Keywords: has-patch dev-reviewed commit
Focuses: Cc:

Description

Few moments ago I've installed (3.4-RC3). Tested things around and it looks awesome, but there something going one with Child Theme Installation.

I've created very basic Twenty Eleven Child Theme, nothing else, single folder and style.css. Zipped the Child Theme, went to uploader and it was all good:

Standard Message:

Unpacking the package…

Installing the theme…

This theme requires a parent theme. Checking if it is installed…

The parent theme, Twenty Eleven 1.3, is currently installed.

Theme installed successfully.

Now when I click on the actual "Activate" link this happens:

  • Your attempt to switch to this theme: “twenty-eleven-child” has failed.

Please try again.

First I was thinking wait, that must be me, than I installed fresh copy and the same thing happened. e-mailed buddy of mine and he confirmed the same exact message.

Please confirm.

Thanks,
Emil

Attachments (7)

Screen Shot 2012-06-12 at 12.01.50 AM.png (20.9 KB) - added by emiluzelac 4 years ago.
Screen Shot 2012-06-12 at 12.02.08 AM.png (7.1 KB) - added by emiluzelac 4 years ago.
hum.zip (3.2 KB) - added by ocean90 4 years ago.
Sample child theme
twenty-eleven-child.zip (1004 bytes) - added by emiluzelac 4 years ago.
20914.diff (838 bytes) - added by duck_ 4 years ago.
20914.2.diff (1.4 KB) - added by duck_ 4 years ago.
Screen Shot 2012-06-16 at 12.42.34 AM.png (5.9 KB) - added by emiluzelac 4 years ago.

Download all attachments as: .zip

Change History (26)

#1 @emiluzelac
4 years ago

Just to add that this was tested with several different Child Themes and not just Twenty Eleven, it's not tied with a single Parent Theme. And also if you skip "Activate" link and go back to Themes you would be able to activate just fine.

#2 @ocean90
4 years ago

  • Component changed from Warnings/Notices to Themes
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.4
  • Priority changed from normal to high

Confirmed.

Also the live preview returns a Cheatin’ uh? message.

#3 @emiluzelac
4 years ago

Super, this time I'm not crazy! And just in time before 3.4 gets released. Who knows maybe one day @Nacin will add my name in contributors list ;)

Thanks bud, I appreciate you checked this!

Emil

@ocean90
4 years ago

Sample child theme

#4 @Mamaduka
4 years ago

@ocean90 hum.zip archive is broken.

#5 @emiluzelac
4 years ago

Just attached another one :)

@duck_
4 years ago

@duck_
4 years ago

#6 @duck_
4 years ago

Attached 20914.2.diff to fix the Activate link after installation or upgrade (the latter untested). I couldn't reproduce the Live Preview cheating message.

See #20916 for partially related issue with network enabling after installation. The child theme part probably belongs here [Edit: not really]

Last edited 4 years ago by duck_ (previous) (diff)

#7 @duck_
4 years ago

  • Keywords has-patch added; needs-patch removed

#8 follow-up: @Mamaduka
4 years ago

Couldn't reproduce this, using latest trunk. Activation and Live Preview works fine with simple child theme.

#9 in reply to: ↑ 8 ; follow-up: @duck_
4 years ago

Replying to Mamaduka:

Couldn't reproduce this, using latest trunk. Activation and Live Preview works fine with simple child theme.

Just checking that you're testing from the post-installation screen. Activation works fine from the main themes list on the Manage Themes page.

#10 in reply to: ↑ 9 @Mamaduka
4 years ago

Replying to duck_:

Just checking that you're testing from the post-installation screen. Activation works fine from the main themes list on the Manage Themes page.

Right reproduced that way, only activation problem, live preview works fine.

#11 @emiluzelac
4 years ago

As I said above: preview is fine, this happens only when your activate the Child Theme as soon as Child is activated :)

#12 @nacin
4 years ago

  • Keywords commit added

Looks good.

#13 @nacin
4 years ago

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

#14 @westi
4 years ago

  • Keywords dev-reviewed added

This change looks good to me too.

#15 @nacin
4 years ago

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

In [21061]:

Use the proper value for the switch-theme nonce in the upgrader. Fixes child theme activation after install. props duck_. fixes #20914.

#16 @emiluzelac
4 years ago

Hey guys,

Just an FYI and not sure why, but moments ago on a clients site, while uploading a Child Theme this happens:

Are you sure you want to do this?
Please try again.

WP 3.4 latest, no beta or anything like that :( They did a regular upgrade when 3.4 was released, this is not a dev site.

Emil

#17 @emiluzelac
4 years ago

Note: Screenshot attached and to add that this happens as soon as child is uploaded and it doesn't even come to "Activate" link.

#18 @nacin
4 years ago

emiluzelac: If you were seeing this problem on 3.4 latest, please raise a new ticket.

Note: See TracTickets for help on using tickets.