Opened 6 months ago
Closed 6 months 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 |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch commit fixed-major dev-reviewed |
Focuses: | Cc: |
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.
6 months ago
#1
- Keywords has-patch has-unit-tests added
This ticket was mentioned in Slack in #core-performance by cbravobernal. View the logs.
6 months ago
@swissspidy commented on PR #6245:
6 months ago
#4
cc @gziolo @luisherranz for reviews
6 months 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
@
6 months ago
- Component changed from General to Editor
- Keywords has-patch commit added
- Owner set to swissspidy
- Status changed from new to reviewing
Marking as commit candidate, pending review from @gziolo
#9
@
6 months ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
@swissspidy commented on PR #6245:
6 months 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.
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_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.