-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getImageList where filter not working with default field values #397
Comments
My config. Nothing special.
{
"formtabs":[
{
"MIGX_id":1,
"caption":"\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":1,
"field":"image",
"caption":"\u0424\u043e\u0442\u043e",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"image",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"migx",
"sources":"",
"inputOptionValues":"",
"default":"",
"useDefaultIfEmpty":"0",
"pos":1
},
{
"MIGX_id":2,
"field":"visible_in_slider",
"caption":"\u0412\u0438\u0434\u0435\u043d \u0432 \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0435",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"migx",
"sources":"",
"inputOptionValues":"1==1",
"default":"0",
"useDefaultIfEmpty":1,
"pos":2
},
{
"MIGX_id":3,
"field":"visible_on_page",
"caption":"\u0412\u0438\u0434\u0435\u043d \u0432 \u043e\u043a\u043d\u0435",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"checkbox",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"migx",
"sources":"",
"inputOptionValues":"1==1",
"default":1,
"useDefaultIfEmpty":1,
"pos":3
}
],
"pos":1
}
],
"contextmenus":"edit_migx||remove_migx_and_image",
"actionbuttons":"loadfromsource||uploadfiles",
"columnbuttons":"remove_migx_and_image",
"filters":"",
"extended":{
"migx_add":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u043e\u0442\u043e",
"disable_add_item":1,
"add_items_directly":1,
"formcaption":"\u0424\u043e\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f",
"update_win_title":"",
"win_id":"migx_photo_uploads_ext_win_id",
"maxRecords":"",
"addNewItemAt":"bottom",
"media_source_id":"",
"multiple_formtabs":"",
"multiple_formtabs_label":"",
"multiple_formtabs_field":"",
"multiple_formtabs_optionstext":"",
"multiple_formtabs_optionsvalue":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"this.uploadImages||this.handleColumnSwitch",
"filtersperrow":4,
"packageName":"",
"classname":"",
"task":"",
"getlistsort":"",
"getlistsortdir":"",
"sortconfig":"",
"gridpagesize":"",
"use_custom_prefix":"0",
"prefix":"",
"grid":"",
"gridload_mode":1,
"check_resid":1,
"check_resid_TV":"",
"join_alias":"",
"has_jointable":"yes",
"getlistwhere":"",
"joins":"",
"hooksnippets":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"permissions":{
"apiaccess":"",
"view":"",
"list":"",
"save":"",
"create":"",
"remove":"",
"delete":"",
"publish":"",
"unpublish":"",
"viewdeleted":"",
"viewunpublished":""
},
"fieldpermissions":"",
"columns":[
{
"MIGX_id":1,
"header":"\u0424\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f",
"dataIndex":"image",
"width":50,
"sortable":"false",
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderImage",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":"",
"editor":""
},
{
"MIGX_id":2,
"header":"\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 (1, 2, 3, 5 \u0448\u0442.)",
"dataIndex":"visible_in_slider",
"width":5,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":3,
"name":"0",
"use_as_fallback":1,
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/no.png"
},
{
"MIGX_id":1,
"name":1,
"use_as_fallback":"",
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/yes.png"
},
{
"MIGX_id":4,
"name":"0",
"use_as_fallback":"",
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/no.png"
}
],
"editor":""
},
{
"MIGX_id":3,
"header":"\u0412 \u043e\u043a\u043d\u0435",
"dataIndex":"visible_on_page",
"width":10,
"sortable":true,
"show_in_grid":1,
"customrenderer":"",
"renderer":"this.renderSwitchStatusOptions",
"clickaction":"switchOption",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":[
{
"MIGX_id":3,
"name":1,
"use_as_fallback":1,
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/yes.png"
},
{
"MIGX_id":4,
"name":"0",
"use_as_fallback":"",
"value":"0",
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/no.png"
},
{
"MIGX_id":1,
"name":1,
"use_as_fallback":"",
"value":1,
"clickaction":"switchOption",
"handler":"",
"image":"assets\/img\/icons\/yes.png"
}
],
"editor":""
}
],
"category":""
}
|
DmitryFX
changed the title
getImageList where filter not working with "use_as_fallback" values
getImageList where filter not working with default field values
Jun 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: