When we have a language code in site URL the language code appears in share image URL and when we share the site link the shared image not appear because of the wrong URL path.


We could use the token as
[site:origin-url]/[default-active-theme:path]/share-image.png
[site:origin-url]/[default-active-theme:path]/logo.png

Origin URL [site:origin-url] The Origin URL (scheme and HTTP host) of the site. No language prefix.


Edit default meta tags dev varbase8c2

Comments

Firass Ziedan created an issue. See original summary.

firass.ziedan’s picture

Status: Active » Needs work
firass.ziedan’s picture

Status: Needs work » Needs review
StatusFileSize
new3.34 KB
mohammed j. razem’s picture

Good catch. There's a patch that will likely be added to Varbase - #1088112: Introduce a token to get site's base URL to provide a token of URL without language.

Does the token [url:absolute] provide the same functionality in the patch above?

firass.ziedan’s picture

thanks, yes! I checked the patch and what I see the token `[url:absolute]` provide the same functionality of the patch provides.
the token provided the site URL without language prefix.

mohammed j. razem’s picture

Project: Varbase SEO » Varbase Core

Until #1088112: Introduce a token to get site's base URL is committed, let's use a custom token. Let's call it: [site:origin-url].

I also think this should be in Varbase Core.

mohammed j. razem’s picture

Title: Remove the language code from share image URL » Provide a new token for the site origin URL (protocol and domain name) without language prefix
Project: Varbase Core » Varbase SEO
Priority: Normal » Major
Status: Needs review » Needs work
Related issues: +#3106793: Provide a new token for the site origin URL (protocol and domain name) without language prefix

Sending back to Varbase SEO module, and filed a new feature request on Varbase Core for the token implementation #3106793: Provide a new token for the site origin URL (protocol and domain name) without language prefix.

rajab natshah’s picture

Title: Provide a new token for the site origin URL (protocol and domain name) without language prefix » Change metatag default config to use Origin URL [site:origin-url] token for the site origin URL (protocol and domain name) without language prefix
Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Title: Change metatag default config to use Origin URL [site:origin-url] token for the site origin URL (protocol and domain name) without language prefix » Change default metatag configs to use Origin URL [site:origin-url] token for the site origin URL (protocol and domain name) without language prefix
rajab natshah’s picture

Status: Needs work » Active
rajab natshah’s picture

Title: Change default metatag configs to use Origin URL [site:origin-url] token for the site origin URL (protocol and domain name) without language prefix » Change default metatag configs to use Origin URL [site:origin-url] token for the site (protocol and domain name) without language prefix
Issue summary: View changes

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.2, +varbase-8.7.5
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed

Tested on new
Varbase 8.7.x single and multilingual installations
Varbase 8.8.x single and multilingual installations

To use in old installations
First, update Varbase core to
varbase_core 8.x-7.10 or varbase_core 8.x-8.2

Go to the metatag configs from "/admin/config/search/metatag" in the GLOBAL, and other used context
Change
[site:url][default-active-theme:path]/share-image.png
to
[site:origin-url]/[default-active-theme:path]/share-image.png

and Change
[site:url][default-active-theme:path]/logo.png
to
[site:origin-url]/[default-active-theme:path]/logo.png

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.