[Twill2] Do settings section support media and how?
As title says, is it possible to inject media here or should I make a custom settings singleton to handle this use case?
17 Replies
They do! They need crop config set in twill.settings.crops, that's it
Ok thank you for the fast reply! Ill try it now. π
Any idea what can cause this? Yes im using translated media fields in the settings section
hmm check the form submission payload
If I dump media payload I get this
But it tries to access it like
Locale which I get is
sl
not sl_{number}
Okay I got to the root cause of the problemBasicly If max on media is 1, this all works as expected since we get payload like this.
But if there is more than 1 media in the payload, save fails since we get payload like second pic above (which should be iterated? )
@ifox.dev So should I stick with the new singleton module in the end? π
ha good catch ok yeah settings in twill 2 are not supporting all use cases, hence the new block powered settings in twill 3. I'd go with a singleton to make sure you can use all fields and options.
Ok thank you for info. Ill stick with the module approach. π Should I report this via issue or its not worth it?
Since active support is going towards 3.x
yeah we'll only focus on critical bug fixes and security issues on Twill 2, so probably no new "features". so I'd consider twill 2 settings as only supporting single medias fields.
Just checked, same code is in the 3.x branch, so it might occur in the future
I'm pretty sure this is basically dead code in twill 3 with the new blocks approach, will need to be cleaned up
Cool, thank you. π