vaersaagod/seomate

Seomate overrides native craft live preview

Closed this issue · 3 comments

Hello,

I noticed a strange behaviour. The plugin works like normal but when I want use the build in craft live preview in the control panel there appears the seomate preview and not the craft live preview:

Bildschirm­foto 2023-02-27 um 12 28 52

Bildschirm­foto 2023-02-27 um 12 29 13

This also happens on the "View" Button which normally opens the entry view in a new tab.

Craft CMS 4.3.10
SEOMate 2.1.0
php 8.1

Has anyone the same problems? Here is my seomate.php file content:

<?php
use craft\helpers\App;

return [
    'siteName' => App::env('SITE_NAME'),
    'defaultProfile' => 'default',
    'applyRestrictions' => true,

    'fieldProfiles' => [
        'default' => [
            'title' => ['seoTitle', 'title', 'headline'],
            'description' => ['seoDescription'],
            'image' => ['seoImage', 'image']
        ],
        'imprint' => [
            'title' => ['title'],
            'description' => null,
            'image' => null,
        ],
        'privacy' => [
            'title' => ['title'],
            'description' => null,
            'image' => null,
        ],
        'newsprofile' => [
            'title' => ['title'],
            'description' => ['newsSummary'],
        ]
    ],

    'profileMap' => [
        'news' => 'newsprofile',
    ],

    'metaPropertyTypes' => [
        'description,og:description,twitter:description' => [
            'type' => 'text',
            'minLength' => 50,
            'maxLength' => 160
        ],
        'image,og:image,twitter:image' => [
            'type' => 'image'
        ],
    ],

    'sitemapEnabled' => true,
    'sitemapConfig' => [
        'elements' => [
            'homepage' => ['changefreq' => 'weekly', 'priority' => 1],
            'pages' => ['changefreq' => 'weekly', 'priority' => 1],
            'news' => ['changefreq' => 'weekly', 'priority' => 1],
        ],
    ],
];

That will happen if there are no other preview targets defined, for the relevant section.

Do you have any preview targets defined in the section's settings?

Sorry @mmikkel,
it's monday 🙈 - thanks for your fast reply. I configured a preview target like this:

Bildschirm­foto 2023-02-27 um 13 08 14

Now it works fine!

Best regards
Jan

@knufri Great, thanks for the follow-up and I'm happy you got it sorted :)