After upgrade to 4.1.4, where is mentoined some kind of new ajax, i found out, that some relations_config that uses manage, fails to open “edit/update” popup with error Undefined array key 0.
i had relation as hasMany… with relation behaviour on controller, and when i tried to open edit mode from rendered relation, it ends up with error after ajax call.
{
"ok": false,
"severity": "error",
"message": "Undefined array key 0",
"invalid": [],
"ops": [
{
"op": "loadAssets",
"type": "js",
"assets": [
"/modules/backend/behaviors/relationcontroller/assets/js/october.relation.js?v49fd8315",
"/modules/backend/widgets/form/assets/js/october.form.js?v49fd8315",
"/modules/backend/formwidgets/fileupload/assets/js/fileupload.js?v49fd8315",
"/modules/backend/formwidgets/recordfinder/assets/js/recordfinder.js?v49fd8315",
"/modules/backend/widgets/lists/assets/js/october.list.js?v49fd8315"
]
},
{
"op": "loadAssets",
"type": "css",
"assets": [
"/modules/backend/behaviors/relationcontroller/assets/css/relation.css?v49fd8315",
"/modules/backend/formwidgets/fileupload/assets/css/fileupload.css?v49fd8315",
"/modules/backend/formwidgets/recordfinder/assets/css/recordfinder.css?v49fd8315"
]
}
],
"redirect": null
}
EDIT:
Find out that problem probably is on file attachments.
I had used thumbOptions and offsets x: and y: and it points to probably wrong data
public function getThumbFilename($width, $height, $options)
{
$options = $this->getDefaultThumbOptions($options);
return 'thumb_' . $this->id . '_' . $width . '_' . $height . '_' . $options['offset'][0] . '_' . $options['offset'][1] . '_' . $options['mode'] . '.' . $options['extension'];
}