-
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
MIGX 2.13.0-rc3 this.renderChunk error #371
Comments
did you try the same setup with MIGX 2.12 and/or MODX 2.8.1 ? |
what do you have in the renderchunk - tpl and what is the code of your listMyResources_adv snippet? |
Hi Bruno, MIGX 2.12 and MODX 2.8.1 was working perfectly. Meaning that it was showing on the column the resource pagetitle and everything was working. my snippet 'listMyResources_adv' code is: $parent = $modx->getOption('parent',$scriptProperties,9); I dont understand what you mean by 'what do you have in the renderchunk - tpl'? |
when you use the renderChunk - renderer for a column, you need to put something into the renderChunk template field. It seems you are confusing renderChunk with renderFirst - renderer? |
Is your snippet static? if so, that's the problem, somehow in the newer modx versions this can not be a static file. |
Summary
After updating to MIGX 2.13.0-rc3 all MIGX TVs that had in the Grid Columns "renderer":"this.renderChunk" crached.
They show all the MIGX TV value as JSON on the grid column and when editing they do not show the values and save does not work.
Step to reproduce
create a MIGX TV with a listbox-multiple TV type field and put some resources on the inputOptionValues:
[
{"caption":"Console codes", "fields":[
{"field":"console","caption":"Console","inputTVtype":"listbox-multiple","inputOptionValues":"@eval return $modx->runSnippet('listMyResources_adv',array('parent' => 15));"}
]}
]
listMyResources_adv snippet returns "pagetile:id" options for every capable resource.
on the grid Columns use renderChunk:
[
{"header": "Console", "width": "160", "sortable": "true", "dataIndex": "console" , "renderer": "this.renderChunk"}
]
Observed behavior
MIGX TV value shown as JSON on the grid column and when editing the selected values are not shown and save does not work.
Expected behavior
The grid column must show the resources pagetitles and editing and save must work.
Workaround
remove the renderer from the grid Columns and everything is working.
the only problem is that on the table now you see the "pagetitle:id" as values and not only the "pagetitle". Its a little bit annoying when you develop a backend for your customer that needs a clear view.
Environment
MODX version 2.8.2, nginx 1.18.0.2-2.centos.7+p18.0.35.0+t210402.1610 , mysql 10.2.37-1.el7.centos
The text was updated successfully, but these errors were encountered: