Skip to content

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

Closed

Description

@bph

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

Activity

  1. draganescu commented on Apr 13, 2020

    @draganescu
    Contributor

    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?

  2. bph commented on Apr 13, 2020

    @bph
    ContributorAuthor

    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

  3. bph commented on Apr 13, 2020

    @bph
    ContributorAuthor

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

  4. bph commented on Apr 13, 2020

    @bph
    ContributorAuthor

    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

  5. draganescu commented on Apr 14, 2020

    @draganescu
    Contributor

    @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!

  6. self-assigned this
    on Apr 14, 2020
  7. added
    [Block] Latest Posts
    [Type] Bug
    on Apr 14, 2020
  8. added this to the Gutenberg 7.9 milestone on Apr 14, 2020
  9. removed this from the Gutenberg 8.0 milestone on Apr 27, 2020
  10. draganescu commented on May 11, 2020

    @draganescu
    Contributor

    Closed by #21359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Block] Latest Posts[Type] Bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions