From c4aa5cdb5e90ad4b420e22772797d16980232a2b Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 15 Apr 2026 18:38:55 +0000
Subject: [PATCH] =Updating custom tables to utilize CustomTable.php

---
 base/seo.php |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/base/seo.php b/base/seo.php
index 41b285d..492e1a3 100644
--- a/base/seo.php
+++ b/base/seo.php
@@ -112,19 +112,37 @@
 					'type'	=> 'JVBase\managers\SEO\render\Thing\CreativeWork\WebSite',
 					'name' => get_bloginfo('name'),
 					'url' => get_home_url(),
-					'id' => get_home_url() . '#website',
+					'id' => get_home_url() . '/#website',
 					'description' => get_bloginfo('description'),
 					'inLanguage' => 'en-CA'
 				],
 				default => []
 			},
 			'archive' => [
-				'type'	=> 'JVBase\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage',
+				'type'	=> 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage',
 				'name'	=> '{{name}}'
 			],
 			default => [],
 		};
-		return apply_filters(BASE.ucfirst($type).ucfirst($format).'Default', $defaults);
+		error_log('Getting defaults for: '.BASE.ucfirst($type).ucfirst($format).'Default');
+		$result = apply_filters(BASE.ucfirst($type).ucfirst($format).'Default', $defaults);
+		if ($format === 'reference' && empty($result)) {
+			$full = self::getDefault($type, 'schema');
+			if (!empty($full)) {
+				$result = [
+					'type'	=> $full['type'],
+					'name'	=> $full['name'],
+					'description'=> $full['description']
+				];
+				$check = ['id', 'url'];
+				foreach ($check as $ch) {
+					if (array_key_exists($ch, $full)) {
+						$result[$ch] = $full[$ch];
+					}
+				}
+			}
+		}
+		return $result;
 	}
 
 	public static function updateHistory(string $type, string $format, array $newest):bool
@@ -257,8 +275,9 @@
 		unset($config['type']);
 		$class = new $className();
 
+
 		foreach ($config as $property => $value) {
-			if (is_array($value)) {
+			if (is_array($value) && array_key_exists('type', $value)) {
 				$value = self::classFromConfig($value, $meta);
 			}
 			$method = 'set'.ucfirst($property);

--
Gitblit v1.10.0