Opened 3 years ago
Closed 3 years ago
#53403 closed defect (bug) (fixed)
Query block: Notice thrown if template includes post content.
Reported by: | peterwilsoncc | Owned by: | |
---|---|---|---|
Milestone: | 5.8 | Priority: | highest omg bbq |
Severity: | blocker | Version: | 5.8 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Including the post content block within a query block will cause a notice to be thrown both within the block editor and when the post containing the query block is viewed on the front end.
The notice is approximately 100K per post (so 500K with five posts, etc).
Steps to reproduce from a fresh install of WP trunk.
- Enable debug mode with logging:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( 'SCRIPT_DEBUG', true );
- Create a new post
- Insert a query block (simple list view with title and excerpt)
- Edit the query block template
- Add a post content block to the template
- Save post as draft
- Observe notice in
wp-content/debug.log
. - Publish post (this will trigger another notice)
- View post on the front end of the site (this will trigger another notice)
- Change debug settings to display errors:
define( 'WP_DEBUG_DISPLAY', true );
- Reload page.
- Observe notice on screen
If I can figure out when this was introduced, I'll post a follow up comment.
--
Due to the size of the notice, I have called this a blocker. I pretty quickly racked up a 17MB log of errors on one of my trunk installs.
I've created a ticket upstream (Gutenberg#32681) but opening this here as it blocks the release due to the size of the error logged.
Change History (10)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
3 years ago
#5
@
3 years ago
- Description modified (diff)
- Keywords needs-testing added
Unless the pull request is updated in the next few hours, it looks like this one will miss RC1. However, I still feel that this is a blocker for 5.8, so I'm going to leave it for now and it can be added prior to RC2.
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
3 years ago
#7
@
3 years ago
This was merged upstream in Gutenberg@a964525bb and will be included in the next package update.
The notice was removed from the logs entirely as it was the result of user input rather than developer error so there was no action a sysadmin/developer could take to avoid the problem.
#8
@
3 years ago
I was able to see only single notice there, not the huge output mentioned here:
https://github.com/WordPress/gutenberg/issues/32681#issuecomment-862789302
The problem with single notice is fixed with the update.
Just cross linking the PR investigating a fix to this: https://github.com/WordPress/gutenberg/pull/33032.