Closed benjamminf closed 7 years ago
So running into a weird bug here where when I create a RichText field to try and replicate this problem. I uncheck asset sources & transforms. But when I save the field and go back in to edit it everything is checked again.
Turns out it is saving the field with the values set to unchecked but they appear rechecked when viewing the field.
Went and looked at your bug report that is what you are seeing too.
Should be fixed in v1.5.5
I'll preface this issue report with this: this is actually a result of a Craft bug.
So what's happing is a rich text field with no checked asset sources and/or transforms ends up throwing a PHP warning on export.
Looking into this, it's due to the fact that Craft is now always storing these "availableAssetSources" and "availableTransforms" keys in the database JSON. This is probably not the right behaviour, but depending on how Craft handle the bug linked above, it may always be the case. I guess the trivial solution would be to add a check for either if the setting is not an empty string, or if the setting is an array.