[wp-trac] [WordPress Trac] #55996: the get_the_block_template_html call all the same functions as the the_conent filter so they are run twice
WordPress Trac
noreply at wordpress.org
Thu Feb 23 21:15:06 UTC 2023
#55996: the get_the_block_template_html call all the same functions as the
the_conent filter so they are run twice
-------------------------------------------------+-------------------------
Reporter: pbearne | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.3
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing changes-requested | performance
-------------------------------------------------+-------------------------
Changes (by flixos90):
* milestone: 6.2 => 6.3
Comment:
We are not really having any path forward here at this point. It seems
that, between the two approaches of removing/re-adding filters
(https://github.com/WordPress/gutenberg/pull/44995 and
https://github.com/WordPress/wordpress-develop/pull/3833) and
foundationally avoiding duplicate parsing of the content
(https://github.com/WordPress/wordpress-develop/pull/3549), both
approaches have problems:
* The approach of removing filters and readding them does not actually
solve the double execution problem.
* The approach of avoiding double execution is a whole lot more complex to
get right, and there are outstanding edge-cases that probably need to be
addressed.
I think it's fair to say that, at least in the current stage they are in,
neither of the approaches is a proper fix for the bug.
I personally think the approach of removing and re-adding filters is a
hacky workaround, not a proper fix. What we should work towards is to
actually avoid double content parsing, as in record content that was
already parsed and ensure that it is not parsed again. This is obviously
quite complex to get right, and so far my PR is not solving it reliably.
Still, I think going with a workaround just because we can get it done
quicker is not a good idea, we should continue working towards an actual
fix for the underlying problem - which is the double parsing, not the
execution of specific filter callbacks.
At this point, unfortunately we are too late in the cycle to get this
done, so I'll move it to 6.3. Let's continue thinking through how we can
properly address this bug.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55996#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list