Opened 2 years ago
Closed 2 years ago
#60743 closed defect (bug) (fixed)
Interactivity API - SSR won't work if ant render_block_data filter edits $parsed_block
| Reported by: | cbravobernal | Owned by: | swissspidy |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | Editor | Version: | |
| Severity: | normal | Keywords: | has-patch commit fixed-major dev-reviewed |
| Cc: | Focuses: |
Description (last modified by )
As commented in https://github.com/WordPress/gutenberg/pull/59057#discussion_r1518417589
If someone edits the $parsed_block variable, it will fail within the Interactivity API SSR processing comparison:
https://github.com/WordPress/wordpress-develop/blob/9a616a573434b432a5efd4de21039250658371fe/src/wp-includes/interactivity-api/interactivity-api.php#L49
It seems that this comparison won't be needed in 6.6, as a md5 bug did not allow to add keys to that variable.
Co-authored with @santosguillamot
Change History (13)
This ticket was mentioned in PR #6245 on WordPress/wordpress-develop by @cbravobernal.
2 years ago
#1
- Keywords has-patch has-unit-tests added
This ticket was mentioned in Slack in #core-performance by cbravobernal. View the logs.
2 years ago
@swissspidy commented on PR #6245:
2 years ago
#4
cc @gziolo @luisherranz for reviews
2 years ago
#5
I don't have enough insight to tell whether the priority 20, 99, or PHP_INT_MAX would work better here. The final approach should most likely impact the render_block_* filter used in this function as it uses exactly the same reasoning:
One important aspect to keep in mind is that we have been talking about when HTML API is capable of processing all HTML tags, we could explore running all the processing in a single pass based on the HTML output generated for the <body> tag in the document. In that case, we wouldn't need to use these filters. Anyway, we are still not there and we would also have to confirm that the performance is equal or improved before switching to that approach.
#6
@
2 years ago
- Component General → Editor
- Keywords has-patch commit added
- Owner set to
- Status new → reviewing
Marking as commit candidate, pending review from @gziolo
@swissspidy commented on PR #6245:
2 years ago
#10
Committed to trunk in https://core.trac.wordpress.org/changeset/57826
Needs double sign-off (dev-reviewed) for backporting to the 6.5 branch.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket:
https://core.trac.wordpress.org/ticket/60743#ticket
As commented in https://github.com/WordPress/gutenberg/pull/59057#discussion_r1518417589
If someone edits the
$parsed_blockvariable, it will fail within the Interactivity API SSR processing comparison:https://github.com/WordPress/wordpress-develop/blob/9a616a573434b432a5efd4de21039250658371fe/src/wp-includes/interactivity-api/interactivity-api.php#L49
It seems that this comparison won't be needed in 6.6, as a md5 bug did not allow to add keys to that variable.