You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a little problem with fileTree Widgets in the MCW and this attribute. The sql use for the value field a simple text type so all binary data would not be readable. So we have to checnge the binary data back to a string.
/** * {@inheritdoc} */publicfunctionvalueToWidget($varValue)
{
if (!is_array($varValue)) {
returnarray();
}
$widgetValue = array();
foreach ($varValueas$row) {
foreach ($rowas$col) {
// We can't handle binary data so we have to replace it.if (Validator::isStringUuid($col['value'])) {
$col['value'] = StringUtil::uuidToBin($col['value']);
}
$widgetValue[$col['row']]['col_' . $col['col']] = $col['value'];
}
}
return$widgetValue;
}
/** * {@inheritdoc} */publicfunctionwidgetToValue($varValue, $itemId)
{
if (!is_array($varValue)) {
returnarray();
}
$newValue = array();
// Start row numerator at 0.$intRow = 0;
foreach ($varValueas$k => $row) {
foreach ($rowas$kk => $col) {
$kk = substr($kk, 4);
// We cant handle binary data so we have to replace it back to string.if(Validator::isBinaryUuid($col)){
$col = StringUtil::binToUuid($col);
}
$newValue[$k][$kk]['value'] = $col;
$newValue[$k][$kk]['col'] = $kk;
$newValue[$k][$kk]['row'] = $intRow;
}
$intRow++;
}
return$newValue;
}
The text was updated successfully, but these errors were encountered:
IMO ir would be better to check if the sub field type is file picker as your implementation now prevents using uuids entirely as it converts them to binary in all cases.
I found a little problem with fileTree Widgets in the MCW and this attribute. The sql use for the value field a simple text type so all binary data would not be readable. So we have to checnge the binary data back to a string.
The text was updated successfully, but these errors were encountered: