Commit 72a52617bc0d9f3e7951df52327a0cc647fd0ac6
1 parent
dd28916f
During bulk upload actions (Bulk Upload, Import from server location) the entere…
…d values for Multi-select fields are not saved to the database. PT: 1638253 Committed by: Charl Joseph Mert
Showing
2 changed files
with
12 additions
and
0 deletions
plugins/multiselect/BulkImport.php
| ... | ... | @@ -317,6 +317,11 @@ class InetBulkImportFolderMultiSelectAction extends KTFolderAction { |
| 317 | 317 | foreach ($fields as $oField) { |
| 318 | 318 | $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId()); |
| 319 | 319 | |
| 320 | + //Fix for multiselect not submitting data due to the value not being flat. | |
| 321 | + if (is_array($val)) { | |
| 322 | + $val = $val[0]; | |
| 323 | + } | |
| 324 | + | |
| 320 | 325 | if ($oFieldset->getIsConditional()) |
| 321 | 326 | { |
| 322 | 327 | if ($val == _kt('No selection.')) | ... | ... |
plugins/multiselect/BulkUpload.php
| ... | ... | @@ -331,6 +331,12 @@ class InetBulkUploadFolderAction extends KTFolderAction { |
| 331 | 331 | foreach ($fields as $oField) { |
| 332 | 332 | //var_dump($oField->getId()); |
| 333 | 333 | $val = KTUtil::arrayGet($values, 'metadata_' . $oField->getId()); |
| 334 | + | |
| 335 | + //Fix for multiselect not submitting data due to the value being an array. | |
| 336 | + if (is_array($val)) { | |
| 337 | + $val = $val[0]; | |
| 338 | + } | |
| 339 | + | |
| 334 | 340 | if ($oFieldset->getIsConditional()) |
| 335 | 341 | { |
| 336 | 342 | if ($val == _kt('No selection.')) |
| ... | ... | @@ -339,6 +345,7 @@ class InetBulkUploadFolderAction extends KTFolderAction { |
| 339 | 345 | } |
| 340 | 346 | } |
| 341 | 347 | |
| 348 | + | |
| 342 | 349 | if (!is_null($val)) { |
| 343 | 350 | $MDPack[] = array( |
| 344 | 351 | $oField, | ... | ... |