Make WordPress Core

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's profile peterwilsoncc Owned by:
Milestone: 5.8 Priority: highest omg bbq
Severity: blocker Version: 5.8
Component: Editor Keywords:
Focuses: Cc:

Description (last modified by desrosj)

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.

  1. Enable debug mode with logging:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'SCRIPT_DEBUG', true );
    
  2. Create a new post
  3. Insert a query block (simple list view with title and excerpt)
  4. Edit the query block template
  5. Add a post content block to the template
  6. Save post as draft
  7. Observe notice in wp-content/debug.log.
  8. Publish post (this will trigger another notice)
  9. View post on the front end of the site (this will trigger another notice)
  10. Change debug settings to display errors: define( 'WP_DEBUG_DISPLAY', true );
  11. Reload page.
  12. 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

#3 @desrosj
3 years ago

Just cross linking the PR investigating a fix to this: https://github.com/WordPress/gutenberg/pull/33032.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


3 years ago

#5 @desrosj
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 @peterwilsoncc
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 @Boniu91
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.

#9 @desrosj
3 years ago

  • Keywords needs-testing removed

The associated PR listed above has been committed and backported.

This should be resolved by [51344]/[51346].

#10 @desrosj
3 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.