Problem/Motivation
When saving settings on the /admin/config/user-interface/easy-breadcrumb page, the lists of words ignored or forced by the capitalizator are lost breaking the functionality.
Steps to reproduce
Visit /admin/config/user-interface/easy-breadcrumb
Enter 'and a of the' to the list of words ignored by the capitalizator in the advanced settings.
Save the settings.
Observe that the list entered has been removed
Observe that capitalisation exists on all words as the list has been removed from config
Proposed resolution
When saving the input 'and a of the', it must be converted and stored in config as an array rather than as a string. There is an existing processValuesToArray function in the general settings form that looks like it was designed for the job, but it is not used anywhere. This function should be used to process the input value prior to saving.
When this setting was converted from a string to an array, an update hook should have been employed. Updating the module from a version that stored the config as a string to a version that stores the config as an array breaks the functionality. Marking this as requires work for an update hook to be added to convert words list config on existing installs.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3165207-Capitalizator-settings-not-saved-3.patch | 949 bytes | alanhdev |
Comments
Comment #2
alanhdev commentedPatch supplied that should apply cleanly to 8.x-1.13 and 8.x-1.x-dev
Comment #3
alanhdev commentedUpdated patch to apply to the forced words settings too.
Comment #4
alanhdev commentedComment #5
alanhdev commentedComment #6
greg boggslooks good
Comment #7
rachelf commentedYes, works for me too.
Comment #8
neslee canil pinto+1 Looks good to me as well. Marking has RTBC.
Comment #10
neslee canil pintoCommitted to dev branch. Thanks.