vaersaagod / seomate

SEO, mate! It's important. That's why SEOMate provides the tools you need to craft all the meta tags, sitemaps and JSON-LD microdata you need - in one highly configurable, open and friendly package - with a super-light footprint.
MIT License
36 stars 8 forks source link

Why does "preview" button in element edit page redirects to seo preview? #77

Closed piotrpog closed 1 year ago

piotrpog commented 1 year ago

Normally this button would just link to entry on frontend. But in some cases it seems to start redirecting to seomate seo preview. And when i set this in seomatic settings, button just vanishes instead reverting to its original function:

previewEnabled' => false,

Not sure what is causing this specifically, as i just create new craft install, added new section and installed plugin, and preview just directs to frontiend instead of seo preview.

On "affected" website i made sure that entries have correct template path, as i know that wrong template path would make preview and view button disappear.

mmikkel commented 1 year ago

This isn't a problem with SEOMate, it's what happens when the section has no preview targets defined in its settings – making the preview target added by SEOMate the only preview target.

The "View" button is never actually a link to the entry's URL or template; it's either a menu with links to all the preview targets (if there are multiple), or a simple link to the first and only preview target (if there is only one).

button just vanishes instead reverting to its original function

That's expected behavior; if you disable SEOMate's SEO preview and the section has no preview targets in its settings, there is nothing for the Preview and View buttons to link to, and Craft doesn't render them.

wrong template path would make preview and view button disappear.

No, entry templates (or URIs) are not relevant for the Preview and View buttons (anymore). It's all about the preview targets.

piotrpog commented 1 year ago

@mmikkel thanks for explaining!

mmikkel commented 1 year ago

Duplicate of #69