-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document structure and stats do not consistently process synced patterns (aka reusable blocks) #33079
Comments
I can confirm this is still an issue in Wordpress 6.3. |
Confirming this is still true testing WP6.4 RC2 as well - headings and text within Synced patterns are not registered in the outline. |
This was also reported in #51909, for the sunced patterns. The word and characters count is still incorrect on current trunk version 17.7.0. See screenshot below. Removing the Low priority label as I think this should be fixed soon. Introducing features that break other existing features and keeping showing users very evident wrong inforation in the user interface is less than ideal. I'm not sure providing users with broken functionality helps with increasing trust with the editor. |
After some quick testing, seems that on current trunk headings within synced patterns are now correctly parsed and added in the document outline. See animated GIF below, where after page refresh the synced pattern is fetched and when loaded the additional heading within the pattern is added to the document outline. Some more extended testing would be welcome. |
Update: testing on latest trunk 18.6.0-rc.1 this appears to still (again?) be a problem. Headings within Synced Patterens aren't included in the document outline. Which makes this feature visibly not fully functional and it's in this state since a while. I would appreciate this issue to get some more priority as it's a buggy functionality visible to all users. In the GIF below:
|
💯 This feels like a serious bug and one that hasn't been addressed for years now. It should ideally be addressed holistically to resolve both this issue and #5037 at the same time. It seems like the Document Outline needs to reflect the actual post content so the heading outline includes synced patterns as well as headings in custom blocks. Without that, the heading outline is frequently wrong, potentially providing an accessibility false positive in the outline. |
I'd totally agree this feature needs to be rethinked. I'm not sure it can be based on the block type. To provide a fully correct outline, this feature needs to be aware of all the headings that are actually rendered, even if they come from, for example, shortcodes (besids patterns, custom blocks, stc.). |
Looking back into this issue after conversation with @artemiomorales at Roma Core Days 2024. I can still reproduce this problem and it's even a broader issue now as the document outline doesn't sync after other updates of the content for example when binding a heading content to a source. Maybe the only way to reliably solve the overall issue would be soething like an action components can subscribe to that signals 'content has been updated'. When the editor signals a content update, other components, also the ones provided by plugins, may do their things. A few cases that can be reproduced on current trunk: 1
Screenshot: To my understanding, a synced pattern in the post markup is only a reference e.g. 2
Screenshot: To my understanding, the post content still contains the original content so that the editor itself and plugins may not be aware the actual rendered content has updated. In the example below, the block markup still has the original heading content
This appears to be a broader issue and applies to other block attributes as well e.g. the alt text of an image, the content of buttons and any other block attribute value the editor itself or plugins may want to use in other components. 3 Considering the two cases above and other potential cases in the future, the post content may not contain the actual content any longer. It may only contain references to other posts or references to sources. However, some functionalities of the editor itseld and plugisn may need to fetch the actual content, and may need to fetch it 'live' after any update. |
Preface: This behaves like a regression for the fix that closed #12042 and #11744.
Description
Step-by-step reproduction instructions
Expected behaviour
Document Outline reflects entire page content regardless of whether it includes a reusable block.
Actual behaviour
Document outline, word count, and character count exclude content in reusable blocks
Screenshots
WordPress information
Device information
The text was updated successfully, but these errors were encountered: