Make WordPress Core

Opened 8 years ago

Closed 5 years ago

#28121 closed enhancement (fixed)

Theme Feature Filter problem with Warnings

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


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: (and many others).

Attachments (3)

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

Download all attachments as: .zip

Change History (14)

#1 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 3.9.2
  • Priority changed from normal to highest omg bbq
  • Severity changed from normal to critical


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:

	[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 API side that should be reverted.

Moving to 3.9.2 for tracking.

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

8 years ago

#2 @SergeyBiryukov
8 years ago

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

#3 @Otto42
8 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
8 years ago

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

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
8 years ago

  • Milestone changed from 3.9.2 to
  • Version trunk deleted

8 years ago

#6 @iandunn
8 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This was my fault, sorry about that :|

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

#7 @obenland
8 years ago

  • Keywords has-patch added
  • Milestone changed from to Awaiting Review
  • Priority changed from highest omg bbq to normal
  • Severity changed from critical to normal
  • Type changed from defect (bug) to enhancement

#8 @wonderboymusic
6 years ago

  • Owner set to jorbin
  • Status changed from reopened to assigned

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.

5 years ago

#10 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 4.8

#11 @SergeyBiryukov
5 years ago

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

In 39906:

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

Props iandunn.
Fixes #28121.

Note: See TracTickets for help on using tickets.