diff --git a/src/HasAssetField.php b/src/HasAssetField.php index 141dc6b6..c2f758c3 100644 --- a/src/HasAssetField.php +++ b/src/HasAssetField.php @@ -12,7 +12,7 @@ trait HasAssetField protected static function getAssetFieldConfig() { if (! $container = config('statamic.seo-pro.assets.container')) { - return false; + return static::getAssetFieldContainerError(); } return [ @@ -21,4 +21,24 @@ protected static function getAssetFieldConfig() 'max_files' => 1, ]; } + + /** + * Show helpful asset field config error. + * + * @return array + */ + protected static function getAssetFieldContainerError() + { + return [ + 'type' => 'html', + 'html' => <<<'HTML' +
+ Asset container not configured. + + Learn more + +
+HTML, + ]; + } }