From f526a69ed7b21d4aa7430a6527cb4950f7d84bfa Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Wed, 27 Feb 2019 18:23:16 +1100 Subject: [PATCH] version 2.1.13.1 --- CHANGELOG.md | 5 +++++ composer.json | 2 +- src/migrations/m190227_000000_fix_project_config.php | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd89e0..75efa83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 2.1.13.1 - 2019-02-27 + +### Fixed +- Fix potential migration issue from 2.1.13 where some fields have no settings. + ## 2.1.13 - 2019-02-27 ### Fixed diff --git a/composer.json b/composer.json index 9d3db99..a07ec5a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "verbb/super-table", "description": "Super-charge your Craft workflow with Super Table. Use it to group fields together or build complex Matrix-in-Matrix solutions.", "type": "craft-plugin", - "version": "2.1.13", + "version": "2.1.13.1", "keywords": [ "craft", "cms", diff --git a/src/migrations/m190227_000000_fix_project_config.php b/src/migrations/m190227_000000_fix_project_config.php index 6a985e5..b77044a 100644 --- a/src/migrations/m190227_000000_fix_project_config.php +++ b/src/migrations/m190227_000000_fix_project_config.php @@ -109,7 +109,10 @@ private function _getFieldData(): array // Massage the data and index by UID foreach ($fieldRows as $fieldRow) { - $fieldRow['settings'] = Json::decodeIfJson($fieldRow['settings']); + if ($fieldRow['settings']) { + $fieldRow['settings'] = Json::decodeIfJson($fieldRow['settings']); + } + $fieldInstance = $fieldService->getFieldById($fieldRow['id']); $fieldRow['contentColumnType'] = $fieldInstance->getContentColumnType(); $fields[$fieldRow['uid']] = $fieldRow;