Skip to content

Commit e7d0b38

Browse files
committed
Fixed migration bug
1 parent 8d7b5d7 commit e7d0b38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/Entries.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,6 @@ public function handleChangedEntryType(ConfigEvent $event): void
16651665
$entryTypeRecord->handle = $data['handle'];
16661666
$entryTypeRecord->icon = $data['icon'] ?? null;
16671667
$entryTypeRecord->color = $data['color'] ?? null;
1668-
$entryTypeRecord->uiLabelFormat = $data['uiLabelFormat'] ?? '{title}';
16691668
$entryTypeRecord->hasTitleField = $data['hasTitleField'];
16701669
$entryTypeRecord->titleTranslationMethod = $data['titleTranslationMethod'] ?? '';
16711670
$entryTypeRecord->titleTranslationKeyFormat = $data['titleTranslationKeyFormat'] ?? null;
@@ -1680,6 +1679,9 @@ public function handleChangedEntryType(ConfigEvent $event): void
16801679
if (Craft::$app->getDb()->columnExists(Table::ENTRYTYPES, 'description')) {
16811680
$entryTypeRecord->description = $data['description'] ?? null;
16821681
}
1682+
if (Craft::$app->getDb()->columnExists(Table::ENTRYTYPES, 'uiLabelFormat')) {
1683+
$entryTypeRecord->uiLabelFormat = $data['uiLabelFormat'] ?? '{title}';
1684+
}
16831685

16841686
if (!empty($data['fieldLayouts'])) {
16851687
// Save the field layout

0 commit comments

Comments
 (0)