Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL is shown twice in snippet preview #464

Open
niektenhoopen opened this issue Nov 14, 2023 · 2 comments
Open

URL is shown twice in snippet preview #464

niektenhoopen opened this issue Nov 14, 2023 · 2 comments

Comments

@niektenhoopen
Copy link
Contributor

niektenhoopen commented Nov 14, 2023

On a multi-site installation, the URL is shown incorrectly in the preview snippet in the CP.

Example:

When visiting the CP under default-domain.com/admin, navigating to the content of the second domain under "Entries", the URL in the SEO optimization preview snippet (the one with the SEO title and meta description) is displayed as:
https://default-domain.com/https://second-domain.com/about-us

Versions:

  • Craft Pro 4.5.10
  • SEO 4.2.1
@niektenhoopen
Copy link
Contributor Author

@Tam I see there was an attempt to fix this 2 years ago in PR #464. I might be able to come up with a (new?) PR but I don't understand what this piece of code should actually do: https://github.com/ethercreative/seo/blame/dc9fa7f47bb5e542afe2f7c7f8d09f047c55ce4c/src/templates/_seo/fieldtype.twig#L116 Can you help?

@FreekVR
Copy link
Contributor

FreekVR commented Feb 29, 2024

We're also (still) facing this issue. It seems the siteUrl passed to the seo snippet is pointing to the default site. While the url of the entry contains the correct domain, which is then not being replaced by an empty string as it doesn't match.

It seems the Craft multisite dropdown is not setting the currentSite used by the SEO plugin, at least not at that point in code execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants