WordPress.org

Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months 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
Priority: high Milestone: 3.4
Component: Themes Version: 3.4
Severity: normal Keywords: has-patch dev-reviewed commit
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 12 months ago.
Screen Shot 2012-06-12 at 12.02.08 AM.png (7.1 KB) - added by emiluzelac 12 months ago.
hum.zip (3.2 KB) - added by ocean90 12 months ago.
Sample child theme
twenty-eleven-child.zip (1004 bytes) - added by emiluzelac 12 months ago.
20914.diff (838 bytes) - added by duck_ 12 months ago.
20914.2.diff (1.4 KB) - added by duck_ 12 months ago.
Screen Shot 2012-06-16 at 12.42.34 AM.png (5.9 KB) - added by emiluzelac 12 months ago.

Download all attachments as: .zip

Change History (26)

comment:1 emiluzelac12 months 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.

comment:2 ocean9012 months 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.

comment:3 emiluzelac12 months 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

ocean9012 months ago

Sample child theme

comment:4 Mamaduka12 months ago

@ocean90 hum.zip archive is broken.

comment:5 emiluzelac12 months ago

Just attached another one :)

duck_12 months ago

duck_12 months ago

comment:6 duck_12 months 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 12 months ago by duck_ (previous) (diff)

comment:7 duck_12 months ago

  • Keywords has-patch added; needs-patch removed

comment:8 follow-up: Mamaduka12 months ago

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

comment:9 in reply to: ↑ 8 ; follow-up: duck_12 months 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.

comment:10 in reply to: ↑ 9 Mamaduka12 months 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.

comment:11 emiluzelac12 months ago

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

comment:12 nacin12 months ago

  • Keywords commit added

Looks good.

comment:13 nacin12 months ago

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

comment:14 westi12 months ago

  • Keywords dev-reviewed added

This change looks good to me too.

comment:15 nacin12 months 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.

comment:16 emiluzelac12 months 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

comment:17 emiluzelac12 months 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.

comment:18 nacin12 months 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.