Open DmitryFX opened 2 years ago
After uploading images: [visible_in_slider] and [visible_on_page] params are stored in a strange way, so getImageList doesn't find them.
Use Default if Empty is set to "YES" Fallback values are set, so everything looks right in the UI.
This shows no results:
[[!getImageList? &docid=`3` &tvname=`migx_photo_uploads` &limit=`10` &where=`{"visible_on_page:=":"1"}` ]]
Array ( [MIGX_id] => 1 [image] => assets/uploads/3/img-8583.JPG [deleted] => 0 [published] => 1 [visible_in_slider_ro] => {"MIGX_id":"3","name":"0","use_as_fallback":"1","value":"use_as_fallback","clickaction":"switchOption","handler":"","image":"assets\/img\/icons\/no.png","idx":0,"_renderer":"this.renderSwitchStatusOptions","selectorconfig":""} [visible_on_page_ro] => {"MIGX_id":"3","name":"1","use_as_fallback":"1","value":"use_as_fallback","clickaction":"switchOption","handler":"","image":"assets\/img\/icons\/yes.png","idx":0,"_renderer":"this.renderSwitchStatusOptions","selectorconfig":""} [_alt] => 0 [_first] => 1 [_last] => 1 [idx] => 1 [property.docid] => 3 [property.tvname] => migx_photo_uploads [property.limit] => 10 )
After ticking-unticking [visible_in_slider] and [visible_on_page] in the interface and saving the document:
The snipppet call from above works as expected, because [visible_in_slider] and [visible_on_page] now exist.
Array ( [MIGX_id] => 1 [image] => assets/uploads/3/img-8583.JPG [deleted] => 0 [published] => 1 [visible_in_slider_ro] => {"MIGX_id":"4","name":"0","use_as_fallback":"","value":"0","clickaction":"switchOption","handler":"","image":"assets/img/icons/no.png","idx":2,"_renderer":"this.renderSwitchStatusOptions","selectorconfig":"","tv_type":"migx"} [visible_on_page_ro] => {"MIGX_id":"1","name":"1","use_as_fallback":"","value":"1","clickaction":"switchOption","handler":"","image":"assets/img/icons/yes.png","idx":2,"_renderer":"this.renderSwitchStatusOptions","selectorconfig":"","tv_type":"migx"} [visible_in_slider] => 0 [visible_on_page] => 1 [_alt] => 0 [_first] => 1 [_last] => 1 [idx] => 1 [property.docid] => 3 [property.tvname] => migx_photo_uploads [property.limit] => 10 )
I'm not sure if it is getImageList problem or it's about setting the default parameters on upload. Please, investigate this.
And some value mismatch right after uploading images. Columns - right, editor - incorrect values.
My config. Nothing special.
After uploading images: [visible_in_slider] and [visible_on_page] params are stored in a strange way, so getImageList doesn't find them.
Use Default if Empty is set to "YES" Fallback values are set, so everything looks right in the UI.
This shows no results:
After ticking-unticking [visible_in_slider] and [visible_on_page] in the interface and saving the document:
The snipppet call from above works as expected, because [visible_in_slider] and [visible_on_page] now exist.
I'm not sure if it is getImageList problem or it's about setting the default parameters on upload. Please, investigate this.