seo icon indicating copy to clipboard operation
seo copied to clipboard

"SEO: Failed to retrieve entry preview" on site with different domains

Open heggemsnes opened this issue 5 years ago • 11 comments

Description

We have a Craft site with multiple domains, .eu, .no and .dk. See Trifid.eu.

The focus keyword function in the SEO field works fine in when editing an entry in the .eu site, but when using the others it gives the error: "SEO: Failed to retrieve entry preview".

The main domain of the site is the .eu so this makes kind of sense, but I guess there should be a way to fix this. Checked .env file like here: https://gitmemory.com/issue/ethercreative/seo/193/490925014

Steps to reproduce

  1. Setup Craft with several sites with different domains, but admin part on specific domain as recommended by Craft
  2. Select SEO field on entry and add focus words

Additional info

  • Craft version: 3.3.13
  • SEO version: 3.6.2
  • PHP version: 7.3.11
  • Database driver & version: MySQL 5.5.5
  • Other Plugins: CP Field Inspect, Icon Picker, Neo, Redactor, Site duplicate, Splash, Typed link field

heggemsnes avatar Dec 12 '19 15:12 heggemsnes

Same happens to me... Seem to be in this ajax post request http://site.localhost/index.php?p=admin/actions/seo/seo/render-data

playengineio avatar Dec 29 '19 23:12 playengineio

Same issue here... how did you fix it ?

cromerog avatar Jan 04 '20 00:01 cromerog

Rolled back to 3.6.2 and it's working now

cromerog avatar Jan 04 '20 01:01 cromerog

interesting, i was having this issue with 3.6.2 https://github.com/ethercreative/seo/issues/273 which is in the same method / action 'render-data' i've upgraded to 3.6.3 and i am now seeing the issue above with "SEO: Failed to retrieve entry preview". It seems to be happening more regularly when viewing Entries now as earlier it was only happening when we had a modal window open.

spork-philip avatar Jan 13 '20 10:01 spork-philip

I'm seeing the same error, but on multiple language-specific sites that use the same domain (ie domain.io, domain.io/es/, domain.io/de, etc). My env file has both "DEFAULT_SITE_URL" and "ROOT_URL" specified to the correct domain.

compass360 avatar Jan 14 '20 16:01 compass360

Had this issue earlier in the year - #193 - and now it appears it's back. My canonical is set.

makereadyisaac avatar Jan 17 '20 18:01 makereadyisaac

Rolled back to 3.6.2 and it's working now

Same for me roll back let the issue disappear

maartenheideman avatar Feb 14 '20 08:02 maartenheideman

Hi, I'm onCraft CMS 3.5.12.1, and SEO 3.6.6, but I still got these error messages: SEO: Failed to retrieve entry preview. How can I fix this?

pixeldeluxe avatar Oct 07 '20 13:10 pixeldeluxe

Any news on this? Still very much a bug and seems unrelated to domain issues that have been referenced. The Ajax call is happening and the response seems valid, at least it's giving a 200 status. Perhaps the bug is in the JS that handles the response?

jakepm avatar Nov 03 '20 23:11 jakepm

Any news on this? Still very much a bug and seems unrelated to domain issues that have been referenced. The Ajax call is happening and the response seems valid, at least it's giving a 200 status. Perhaps the bug is in the JS that handles the response?

We have also the same issue in version 3.6.6 (craft v 3.4.27)

Actually I found that the error occurs, if on the target page, no svg image is available. Javascript fails on forEach, because the Regex does not match, if no svg is available.

forcehobbit avatar Nov 04 '20 06:11 forcehobbit

Same issue. Domain issues are not relevant to our use-case.

Christophvh avatar Jan 13 '21 16:01 Christophvh