From 994db7c84705d2f1c6c2bf22dd15ccafe4edf0b3 Mon Sep 17 00:00:00 2001 From: Ann Torockio Date: Mon, 20 Mar 2023 20:21:46 -0400 Subject: [PATCH 1/2] in renderChunk function, convert any multivalue fields, stored as arrays, comma delimited list string --- core/components/migx/model/migx/migx.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/components/migx/model/migx/migx.class.php b/core/components/migx/model/migx/migx.class.php index 564f164..2c13e19 100644 --- a/core/components/migx/model/migx/migx.class.php +++ b/core/components/migx/model/migx/migx.class.php @@ -1638,6 +1638,13 @@ function getColumnRenderOptions($col = '*', $indexfield = 'idx', $format = 'json function renderChunk($tpl, $properties = array(), $getChunk = true, $printIfemty = true) { + /* convert any multivalue fields, stored as arrays, comma delimited list string */ + foreach ($properties as $key => $prop) { + if (is_array($prop) && count($prop) > 0) { + $properties[$key] = implode(',',$prop); + } + } + $value = $this->parseChunk($tpl, $properties, $getChunk, $printIfemty); $this->modx->getParser(); From ce651efcbf7ceda93f8afbc01aae0a078744df53 Mon Sep 17 00:00:00 2001 From: Ann Torockio Date: Mon, 20 Mar 2023 20:26:35 -0400 Subject: [PATCH 2/2] fix typo in comment --- core/components/migx/model/migx/migx.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/components/migx/model/migx/migx.class.php b/core/components/migx/model/migx/migx.class.php index 2c13e19..eb2aa8b 100644 --- a/core/components/migx/model/migx/migx.class.php +++ b/core/components/migx/model/migx/migx.class.php @@ -1638,7 +1638,7 @@ function getColumnRenderOptions($col = '*', $indexfield = 'idx', $format = 'json function renderChunk($tpl, $properties = array(), $getChunk = true, $printIfemty = true) { - /* convert any multivalue fields, stored as arrays, comma delimited list string */ + /* convert any multivalue fields, stored as arrays, to comma delimited list string */ foreach ($properties as $key => $prop) { if (is_array($prop) && count($prop) > 0) { $properties[$key] = implode(',',$prop);