You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the first warning has occured, an error will be triggerd if the user then tries to save the entry.
Steps to reproduce
I've not been able to reproduce this error in a consistant manner, but it has been triggered sometimes following these steps.
Create a new matrix field with 1 block containing 3 fields; one text field for title, one URL field for the url and one lightswitch.
Create new entry type containing the new matrix field.
Create a new entry of the new type and add some blocks to the new matrix and save the entry.
After saving the entry, reload the page, and open developer tools.
Edit one of the fields (either the title or the URL field), by either adding or removing content. Try to do this at various input sppeds as this has increased my chances of triggering the error.
When autosave triggers, check for the console warning "Couldn't save draft" and the endless spinner icon. If the warning was not triggered, continue editing other fields in the entry, or reload the page again to start over. Eventually the error will be triggered.
If warning has been triggered, try to save with CTRL + S and observe error in console.
Expected behavior
Update of content should work as expected.
Actual behavior
Javascript error is triggered causing auto-save and save to fail.
Craft CMS version
3.7.61
PHP version
7.4.3
Operating system and version
Linux 5.10.102.1-microsoft-standard-WSL2
Database type and version
MySQL 8.0.29
Image driver and version
GD 7.4.30
Installed plugins and versions
Amazon S3 1.3.0
Asset Rev 6.0.2
Cookies 1.1.15
CP Field Inspect 1.4.4
Craft Youtube 1.0.23
Dumper 2.0.0
Expanded Singles 1.2.0
Feed Me 4.5.3
Imageshop 1.0.21
Imgix 2.1.0
Navigation 1.4.31
Redactor 2.10.10
Retour 3.2.4
SEOMate 1.1.13
Super Table 2.7.3
Typed link field 1.0.25
The text was updated successfully, but these errors were encountered:
Thanks for reporting that! We just released Craft 3.7.62 and 4.3.5 with updates to that logic to be a bit more defensive. Now if _filterFieldInputName() comes across an input name it wasn’t expecting, a warning will be logged out to the console.
If you don’t mind, it would be great if you could attempt to reproduce on 3.7.62 with your browser console open, and let me know what the warning message is, so we can fix the bug at the source.
Testing on the 3.7.62 release I was not able to reproduce the endless spinner and subsequent error log, as the added throw/catch fixes this, instead I got the new console warnings:
I did notice that when the "Unexpected input name" warning appears, ANY content changes done, including the one that triggered that warning, will be lost when the document is saved. This wasn't an issue earlier, as saving would not work anymore when the error had occured, but now an editor would assume everything is OK, even when it's not.
A little breakdown of what steps I did the for the screenshot above:
Loaded the relevant entry
Did a content change to one field, this triggered the first network request for save-draft (see screenshots below)
Did 3 further content changes to various input fields, all of them triggering a network request (see screenshots below) and also a a warnings for "Unexpected input name" (screenshot above)
Saved the entry with ctrl + s
Verified that the 3 content changes that was done was NOT saved (screenshots below)
Updated entry content before saving
Loaded entry content after save (only the first of the content changes was saved)
Screenshot of all network requests, payload and response preview
What happened?
Description
Sometimes when editing fields inside a matrix, auto-save triggers a warning that in turn makes saving impossible.
The triggered error is the following:
This error is triggered because
nestedNames
inside_filterFieldInputName()
(https://github.com/craftcms/cms/blob/3.8/src/web/assets/cp/src/js/DraftEditor.js#L1289) returns null (I haven't been able to determine why this returns null).The first time the error is triggered, it is caught by https://github.com/craftcms/cms/blob/3.8/src/web/assets/cp/src/js/DraftEditor.js#L890 and logged as a warning to the console, and the auto-save icon turns into an endless spinner.
When the first warning has occured, an error will be triggerd if the user then tries to save the entry.
Steps to reproduce
I've not been able to reproduce this error in a consistant manner, but it has been triggered sometimes following these steps.
Expected behavior
Update of content should work as expected.
Actual behavior
Javascript error is triggered causing auto-save and save to fail.
Craft CMS version
3.7.61
PHP version
7.4.3
Operating system and version
Linux 5.10.102.1-microsoft-standard-WSL2
Database type and version
MySQL 8.0.29
Image driver and version
GD 7.4.30
Installed plugins and versions
The text was updated successfully, but these errors were encountered: