alleyinteractive / apple-news

The Publish to Apple News plugin enables your WordPress blog content to be published to your Apple News channel.
https://wordpress.org/plugins/publish-to-apple-news/
GNU General Public License v3.0
155 stars 71 forks source link

New Notice thrown in Admin when using version 2.4.7 #1087

Closed surrealwebs closed 8 months ago

surrealwebs commented 8 months ago

Description of the bug

The switch to use REST API instead of JSON for sections introduced a new notice:

Notice: Function register_meta was called incorrectly. When registering an "array" meta type to show in the REST API, you must specify the schema for each array item in "show_in_rest.schema.items".

Steps To Reproduce

  1. Install version 2.4.7, activate the plugin and configure.
  2. View the Admin with display errors turned on.
  3. Notice is displayed.

Additional Information

I traced the issue to this commit https://github.com/alleyinteractive/apple-news/commit/4040b20f8e8c34f3907e73df743ae45eecf17a2e. There are a couple meta values given the type "array" without defining the associated schema.

attackant commented 8 months ago

Confirmed. Will fix.

srtfisher commented 8 months ago

Fixed in https://github.com/alleyinteractive/apple-news/releases/tag/v2.4.8