Yoast/Yoast-SEO-for-Neos

Snippet editor cannot update Neos fields since Neos 8.x

Closed this issue · 3 comments

Hi,

since updating to Neos 8.3, the snippet editor in the Yoast Seo View produces the following JS error when I change the value of a field.
It does not matter which one of SEO title, Slug or Meta description is changed. The error occurs directly in the change event in any of the input fields:

Bildschirmfoto-2023-09-07-um-11 13 12@2x

Uncaught TypeError: field is null
    updateNeosFields webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34075
    debouncedUpdateNeosFields webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34087
    Lodash 5
    updateEditorData webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34094
    onEditorChange webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34139
    handleChange webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:33375
    onChange webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:32994
    serializeContent webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:30807
    onChange webpack://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:30825

See: https://github.com/Yoast/Yoast-SEO-for-Neos/blob/92deb9ffe6b88c3fa23718eb1876252a08a18895/Resources/Private/Scripts/edit-mode/src/hooks/useNeosFields.js#L22C18-L22C18

In Neos 8.3 no element matching the selector .snippet-editor__title-override .neos-inline-editable exists. snippet-editor__title-override exists however.

I reproduced this error by installing a clean Neos 8.3 containing only the demo site and the Yoast for Neos package.
The same clean site works fine with Neos 7.3.

Can anyone confirm this error with Neos 8.x (and maybe newer versions too)?

Regards
Leif

Sebobo commented

So this broke due to a change in Neos 8.3. Have to make a small adjustment.

Sebobo commented

Fixed via e50c8de in the next release

Hi Sebastian,

thanks your work. Thats was fast.