Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#28121 closed enhancement (fixed)

Theme Feature Filter problem with Warnings

Reported by: pavelevap Owned by: jorbin
Priority: normal Milestone: 4.8
Component: Themes Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

There are several Warnings:

Warning: Illegal offset type in isset or empty in C:\www\wordpress\src\wp-admin\includes\theme.php on line 269

Warning: Illegal offset type in C:\www\wordpress\src\wp-admin\includes\theme.php on line 272

Using latest xampp, Windows, I am not sure if it is not somehow related to .org API?

Related topic: http://wordpress.org/support/topic/after-installation-of-wperror-occurs-in-appearance-themes-feature-filter (and many others).

Attachments (3)

28121.patch (609 bytes ) - added by SergeyBiryukov 12 years ago.
28121.png (55.3 KB ) - added by SergeyBiryukov 12 years ago.
28121.tests.diff (2.3 KB ) - added by iandunn 12 years ago.

Download all attachments as: .zip

Change History (14)

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review3.9.2
  • Priority normalhighest omg bbq
  • Severity normalcritical

Confirmed.

See the relevant block in get_theme_featured_list(): tags/3.9/src/wp-admin/includes/theme.php#L261.

$feature_items used to be a simple array, and now it contains a nested array:

Array(
	[name] => Colors
	[items] => Array(
		[black] => black
		[blue] => blue
		[brown] => brown
		[gray] => gray
		[green] => green
		[orange] => orange
		[pink] => pink
		[purple] => purple
		[red] => red
		[silver] => silver
		[tan] => tan
		[white] => white
		[yellow] => yellow
		[dark] => dark
		[light] => light
	)
)

28121.patch fixes this, but it's also broken in 3.8.3 and all previous versions, so this looks like an accidental change on the WordPress.org API side that should be reverted.

Moving to 3.9.2 for tracking.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

@SergeyBiryukov
12 years ago

#2 @SergeyBiryukov
12 years ago

To be clear, it's not just the warnings, the feature filter is currently unusable (see the screenshot).

#3 @Otto42
12 years ago

This was caused by some changes to the themes directory for I18N reasons. Looking into how to properly revert this change now.

cc @iandunn

#4 @Otto42
12 years ago

  • Resolutionfixed
  • Status newclosed

API changes reverted. The intended changes will have to be redone in a different way.

The API response should not have been changed at all, so the core patch is not necessary at this time.

#5 @SergeyBiryukov
12 years ago

  • Milestone 3.9.2WordPress.org
  • Version trunk

@iandunn
12 years ago

#6 @iandunn
12 years ago

  • Resolution fixed
  • Status closedreopened

This was my fault, sorry about that :|

I attached some unit tests that would have caught the mistake.

#7 @obenland
12 years ago

  • Keywords has-patch added
  • Milestone WordPress.orgAwaiting Review
  • Priority highest omg bbqnormal
  • Severity criticalnormal
  • Type defect (bug)enhancement

#8 @wonderboymusic
11 years ago

  • Owner set to jorbin
  • Status reopenedassigned

We should commit these tests in the external http group and then close this ticket.

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


10 years ago

#10 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review4.8

#11 @SergeyBiryukov
10 years ago

  • Resolutionfixed
  • Status assignedclosed

In 39906:

Themes: Add a unit test for get_theme_feature_list() to make sure that the list of theme features pulled from the WordPress.org API returns the expected data structure.

Props iandunn.
Fixes #28121.

Note: See TracTickets for help on using tickets.