Skip to content

Commit caff632

Browse files
committed
Merge remote-tracking branch 'origin/1.7' into 2.1
2 parents 700595f + 2f58f9b commit caff632

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

public/css/icons.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,10 @@
10211021
background: url(/bundles/pimcoreadmin/img/flat-color-icons/cell_phone_landscape.svg) center center no-repeat !important;
10221022
}
10231023

1024+
.pimcore_icon_systemrequirements {
1025+
background: url(/bundles/pimcoreadmin/img/flat-color-icons/factory.svg) center center no-repeat !important;
1026+
}
1027+
10241028
.pimcore_icon_notes {
10251029
background: url(/bundles/pimcoreadmin/img/flat-color-icons/survey.svg) center center no-repeat !important;
10261030
}

src/Controller/Admin/Document/LinkController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,25 +116,24 @@ protected function setValuesToDocument(Request $request, Document $document): vo
116116

117117
if (!$target) {
118118
if ($target = Document::getByPath($path)) {
119-
$data['linktype'] = 'internal';
120119
$data['internalType'] = 'document';
121120
$data['internal'] = $target->getId();
122121
} elseif ($target = Asset::getByPath($path)) {
123-
$data['linktype'] = 'internal';
124122
$data['internalType'] = 'asset';
125123
$data['internal'] = $target->getId();
126124
} elseif ($target = Concrete::getByPath($path)) {
127-
$data['linktype'] = 'internal';
128125
$data['internalType'] = 'object';
129126
$data['internal'] = $target->getId();
130127
} else {
131128
$data['linktype'] = 'direct';
132129
$data['internalType'] = null;
130+
$data['internal'] = null;
133131
$data['direct'] = $path;
134132
}
135133

136134
if ($target) {
137135
$data['linktype'] = 'internal';
136+
$data['direct'] = '';
138137
}
139138
}
140139
} else {

src/Service/GridData/DataObject.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ public static function getData(AbstractObject $object, ?array $fields = null, ?s
169169
) {
170170
$data[$dataKey . '%options'] = $def->getOptions();
171171
}
172+
173+
// to prevent malforded grids in case of empty fieldcollections
174+
if ($def instanceof ClassDefinition\Data\Fieldcollections) {
175+
$data[$dataKey] ??= '';
176+
}
172177
}
173178
} else {
174179
$data[$dataKey] = $valueObject->value;
@@ -351,7 +356,16 @@ protected static function getInheritedData(Concrete $object, string $key, string
351356
}
352357

353358
$inheritedValue = self::getStoreValueForObject($parent, $key, $requestedLanguage);
354-
if ((!is_array($inheritedValue) && $inheritedValue !== null) || !empty($inheritedValue['value'])) {
359+
if (
360+
(!is_array($inheritedValue) && $inheritedValue !== null) ||
361+
(
362+
is_array($inheritedValue) &&
363+
(
364+
array_is_list($inheritedValue) || //for table field types
365+
!empty($inheritedValue['value'] ?? null)
366+
)
367+
)
368+
) {
355369
return [
356370
'parent' => $parent,
357371
'value' => $inheritedValue,

0 commit comments

Comments
 (0)