Gutenberg: Latest post: Category selection triggers notice, displayed on front end

Created on 12 Apr 2020  路  6Comments  路  Source: WordPress/gutenberg

Describe the bug
"Notice: Undefined index: items in /app/public/wp-includes/rest-api.php on line 1245

To reproduce
Steps to reproduce the behavior:

  1. Add Latest Post Block to a page
  2. Select Category "Uncategorized"
  3. Publish page
  4. View page.

Expected behavior
No display of notices.

Screenshots
Screen Shot 2020-04-11 at 6 05 26 PM

Tested it with clean install
Screen Shot 2020-04-11 at 6 03 23 PM

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOS 10.15.3
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] Version 80.0.3987.163

Additional context
WordPress 5.4 - Note: I was not able to reproduce in 5.4 RC. if that helps with locating things.
Gutenberg 7.8.1

[Block] Latest Posts [Type] Bug

Most helpful comment

@bph I can confirm this now and it is indeed a problem that #21359 may fix. If the block is created in pre 7.8.1 Gutenberg and is filtered, then after upgrading this error starts to show up. Will investigate further!

All 6 comments

I was not able to reproduce this with WordPress 5.4 and Gutenberg 7.8.1 even after enabling display all errors in PHP. I wonder if I am missing anything?

When trying to edit the page with the Latest Post block, I also get for a brief moment these warnings, before the editor is fully loaded.
Screen Shot 2020-04-13 at 10 00 06 AM

@draganescu Thanks for testing this. Here is my Block Settings in the sidebar
Screen Shot 2020-04-13 at 10 02 14 AM

Using the Site Health Troubleshooting Mode on a live site:
It occurs only when Gutenberg plugin is enabled (7.8.1)
There is a chance it'll be fixed with this PR #21359

@bph I can confirm this now and it is indeed a problem that #21359 may fix. If the block is created in pre 7.8.1 Gutenberg and is filtered, then after upgrading this error starts to show up. Will investigate further!

Closed by #21359

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hedgefield picture hedgefield  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

spocke picture spocke  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments