Hello! I've searched for the solution on this forum and google but I didn't find anything, so I could do nothing but ask for help:
I want to assing custom media source for MIGX image field. I use MIGX configurator, here is the schema:
{
"formtabs":[
{
"MIGX_id":2,
"caption":"\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0443\u0441\u043b\u0443\u0433\u0438",
"print_before_tabs":"0",
"fields":[
{
"MIGX_id":5,
"field":"resource",
"caption":"resource",
"description":"",
"description_is_code":"0",
"inputTV":"",
"inputTVtype":"resourcelist",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"config",
"sources":"",
"inputOptionValues":"",
"default":"",
"pos":1
},
{
"MIGX_id":7,
"field":"image",
"caption":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
"description":"",
"description_is_code":"0",
"inputTV":"service_image",
"inputTVtype":"",
"validation":"",
"configs":"",
"restrictive_condition":"",
"display":"",
"sourceFrom":"tv",
"sources":"",
"inputOptionValues":"",
"default":"",
"pos":2
}
],
"pos":1
}
],
"contextmenus":"update||remove",
"actionbuttons":"addItem",
"columnbuttons":"",
"filters":"",
"extended":{
"migx_add":"",
"disable_add_item":"",
"formcaption":"popularservices",
"update_win_title":"",
"win_id":"popularservices",
"maxRecords":"",
"addNewItemAt":"bottom",
"multiple_formtabs":"",
"actionbuttonsperrow":4,
"winbuttonslist":"",
"extrahandlers":"",
"filtersperrow":4,
"packageName":"popularservices",
"classname":"Popularservices",
"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":"",
"cmpmaincaption":"",
"cmptabcaption":"",
"cmptabdescription":"",
"cmptabcontroller":"",
"winbuttons":"",
"onsubmitsuccess":"",
"submitparams":""
},
"columns":[
{
"MIGX_id":3,
"header":"id",
"dataIndex":"id",
"width":"",
"sortable":"false",
"show_in_grid":"0",
"renderer":"",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":""
},
{
"MIGX_id":2,
"header":"\u0423\u0441\u043b\u0443\u0433\u0430 (\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0441\u0443\u0440\u0441)",
"dataIndex":"resource",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderChunk",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"[[#[[+resource]].pagetitle]] ([[+resource]])",
"renderoptions":""
},
{
"MIGX_id":4,
"header":"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
"dataIndex":"image",
"width":"",
"sortable":"false",
"show_in_grid":1,
"renderer":"this.renderImage",
"clickaction":"",
"selectorconfig":"",
"renderchunktpl":"",
"renderoptions":""
}
]
}
The media source path and url are both "assets/content/services-images/", relative path and url are on.
I use CMP to manage the records, and they are saved properly in the DB table. When I go to my CMP and press "Add item" and choose the image, it starts with the correct folder, "assets/content/services-images/". But when I click save, it doesn't show the thumbnail in the grid. The image src as Firebug shows is: "/connectors/system/phpthumb.php?h=60&src=./164673_0.1364489472.jpg&source=1". Just in case, I've set all files and folders permission to 777 for the test. MODX version is 2.3.1, and 2.2.15 (I've tried both of them), and MIGX version is 2.8.1.