Settings fail to save when only one language is available #50
Labels
status: working on it
Someone is already working on this issue
type: bug
Something isn't working
type: enhancement
New feature or request
Hello, thanks for such an amazing admin package, I absolutely love Twill!
I'm having the following issue: I'm building a CMS for a single language website (english). I enabled the Settings option in the config/twill.php file, I copied the settings migration to my migrations folder as suggested in the documentation but removed the translations table as I will not use it. My "translatable" locales settings array only contains the "en" code so no other languages are available. The problem comes when I try to store some settings as I get the following error:
ErrorException (E_WARNING) Illegal string offset 'en' 66 ErrorException …/vendor/area17/twill/src/Repositories/SettingRepository.php45
I've tried adding the "translated=false" attribute on the form fields but I still get the same error.
I removed the tables and re-executed the migrations but this time leaving the translations table, I enabled the translated=true attribute on the form fields and it worked correctly, however I can't store any images so it does not solve my problem.
Any help would be much appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: