Skip to content
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

Snippet editor cannot update Neos fields since Neos 8.x #99

Closed
fadorator opened this issue Sep 7, 2023 · 3 comments
Closed

Snippet editor cannot update Neos fields since Neos 8.x #99

fadorator opened this issue Sep 7, 2023 · 3 comments
Assignees
Labels

Comments

@fadorator
Copy link

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:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34075
    debouncedUpdateNeosFields webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34087
    Lodash 5
    updateEditorData webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34094
    onEditorChange webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:34139
    handleChange webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:33375
    onChange webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:32994
    serializeContent webpack:https://@yoast-seo-for-neos/edit-mode/./src/index.jsx_+_232_modules?:30807
    onChange webpack:https://@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 Sebobo self-assigned this Sep 11, 2023
@Sebobo Sebobo added the bug label Sep 11, 2023
@Sebobo
Copy link
Collaborator

Sebobo commented Sep 22, 2023

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

@Sebobo
Copy link
Collaborator

Sebobo commented Sep 22, 2023

Fixed via e50c8de in the next release

@Sebobo Sebobo closed this as completed Sep 22, 2023
@fadorator
Copy link
Author

Hi Sebastian,

thanks your work. Thats was fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants