WordPress / revisions-extended

71 stars 11 forks source link

Full Site Editing: Doesn't work when 'editing' a template within gutenberg. #76

Closed StevenDufresne closed 2 years ago

StevenDufresne commented 3 years ago

You can live edit a template within the Gutenberg editor when an FSE compatible theme (https://wordpress.org/themes/tt1-blocks) is installed.

Screenshot

If you click edit the template loads within the editor and our checkbox no longer works.

Errors

Uncaught TypeError: Cannot read property 'insertBefore' of null
    at insertButton (interface.js:38)
    at toggleBtnOn (interface.js:83)
    at setShouldIntercept (interface.js:125)
    at onChange (index.js?ver=32577d5534cc8d1a572e24e78c4156a2:3)
    at HTMLUnknownElement.callCallback (react-dom.82e849f1.js:182)
    at Object.invokeGuardedCallbackDev (react-dom.82e849f1.js:231)
    at invokeGuardedCallback (react-dom.82e849f1.js:286)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.82e849f1.js:300)
    at executeDispatch (react-dom.82e849f1.js:383)
    at executeDispatchesInOrder (react-dom.82e849f1.js:408)

This is related to the way we insert a new button at the top of the editor. With FSE, that button has been removed.

StevenDufresne commented 2 years ago

Unable to reproduce with latest version of Gutenberg.