From 9923f087a6ea6b640b129d2a54bb427c95fb641c Mon Sep 17 00:00:00 2001 From: ro Date: Tue, 4 Jun 2024 15:19:46 -0600 Subject: [PATCH] fix for tag sorting and html page render when sorting tags on a fresh install, a fatal error happens when the tag array is empty because it looks for a var that doesn't exist yet. that's been patched the settings json file was still referencing the old version of the base theme, so it was crashing because it doesn't exist anymore. updating it to the new theme name clears this error --- app/Services/Data/SortingService.php | 7 +++++-- content/init/settings-template.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Services/Data/SortingService.php b/app/Services/Data/SortingService.php index 9e0296a..b071d8e 100644 --- a/app/Services/Data/SortingService.php +++ b/app/Services/Data/SortingService.php @@ -60,14 +60,17 @@ class SortingService } $tagData = []; - //dd($this->settings->getTags()['pages']); + $settingsTags = []; + if (isset($this->settings->getTags()['pages'])) { + $settingsTags = $this->settings->getTags()['pages']; + } $tagData = [ 'debug' => $debug, // for theme kit 'tags' => $this->p_tags, 'theme' => $this->info['theme'], // for theme kit 'title' => 'Pages Tagged as Tag', 'dynamicRender' => $this->info['dynamicRender'], - 'pages' => $this->settings->getTags()['pages'], + 'pages' => $settingsTags, 'info' => $this->info, 'menu' => $this->settings->getMenu(), 'media' => [ diff --git a/content/init/settings-template.json b/content/init/settings-template.json index a9681d8..b4dcc82 100644 --- a/content/init/settings-template.json +++ b/content/init/settings-template.json @@ -6,7 +6,7 @@ "background": "/assets/images/global/default-bg.jpg", "private": "true", "renderOnSave": "false", - "theme": "fipamo-default", + "theme": "fipamo-default-v2", "display_limit": 5, "last_backup": null, "externalAPI": "false",