here is an example of where setAttributes might be called and make the editor dirty
Plugin Support
Darian
(@d0153)
Hi @adrock42
Thank you for reaching out and providing the details about the issue.
Let me share this with the team for their review, and I will keep you updated as soon as I have more information.
Plugin Support
Darian
(@d0153)
Hi @adrock42
I’m glad you brought this to our attention, our team is already checking on this issue, and we’ve already created an internal ticket [TECTRIA-645] to address. I’ve also included your specific use case in it to communicate it to our team.
We prioritize bugs by taking into consideration the number of users impacted as well as how the bug impacts one’s ability to run an event/sell tickets. I don’t have a specific timeline as to when this issue will be resolved, but trust that our team is aware. Our team communicates updates and bug fixes in our newsletter and via our changelog.
In the meantime, it would be greatly helpful if you could provide detailed steps on how we can replicate the issue. This will allow us to investigate further and identify the root cause more effectively.
Looking forward to your reply.
—
Internal Bug Ticket Reference: TECTRIA-645
a very simple example would be something like
registerBlockType( 'my/block-name', {
edit: ( props ) => {
const { attributes: {myClientId}, clientId, setAttributes } = props;
useEffect(()=>{
setAttributes({myClientId:clientId})
}, [clientId])
}
})
this would make the editor immediately dirty when the block loads which is not great, but some blocks might have to use that as the clientId is changed on every load of the editor. None the less, TEC will be the good code test for other block devs in it’s current state. I suggested something like this in the subscriber so that this code is not run against posts that are not events.
const postType = wpSelect( 'core/editor' ).getPostTypeLabel();
if( postType!==editor.EVENT ) return;
This only happens when editing a page on /wp-admin/site-editor.php and not /wp-admin/post.php
I also see the same error when adding a paragraph to a page in the site-editor, saving the page, then reloading. After the reload, when I delete the paragraph I get the same error:
Cannot read properties of undefined (reading 'meta')
I observed the error in a new local site with the 2024 theme enabled and no other plugins enabled. In short, the subscriber mentioned in the first comment is too greedy when editing a page with the site-editor
Plugin Support
Darian
(@d0153)
Hi @adrock42
Thank you for your response.
I’ll make sure to share this with the team for further review.
If you have any other questions or concerns, please feel free to start a new thread. This helps us track topics and issues more effectively while adhering to the WordPress Forum Guidelines.
We appreciate your understanding and look forward to assisting you further.
Plugin Support
Darian
(@d0153)
Hi @adrock42
It seems there hasn’t been any recent activity on this thread, so we’ll close this for now. Rest assured, we’ll provide an update here as soon as the fix is released.
Thank you for your patience and understanding.