Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bph opened this issue Apr 11, 2020 · 6 comments
Closed

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

bph opened this issue Apr 11, 2020 · 6 comments
Assignees
Labels
[Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended

Comments

@bph
Copy link
Contributor

bph commented Apr 11, 2020

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

@draganescu
Copy link
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?

@bph
Copy link
Contributor Author

bph commented Apr 13, 2020

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

@bph
Copy link
Contributor Author

bph commented Apr 13, 2020

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

@bph
Copy link
Contributor Author

bph commented Apr 13, 2020

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

@draganescu
Copy link
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!

@draganescu draganescu self-assigned this Apr 14, 2020
@draganescu draganescu added [Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended labels Apr 14, 2020
@draganescu draganescu added this to the Gutenberg 7.9 milestone Apr 14, 2020
@aduth aduth removed this from the Gutenberg 8.0 milestone Apr 27, 2020
@draganescu
Copy link
Contributor

Closed by #21359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants