Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Social Share Duplicated Web Address

Started by Erdinc 8 years ago · 5 replies · 907 views
8 years ago

Hi there,

When sharing the pages on social with the plugin social-share makes a duplicated web address but cannot find the fix.

<a href="https://www.facebook.com/sharer/sharer.php?u={{ page_url }}" class="popup" target="_blank">

07%20PM|417x197

8 years ago

I am having the exact same problem and it's brand new for me too. I've outlined it here, so you may want to keep track of that topic as well. Though of course if I discover a solution, I'll share it with you right away.

8 years ago

İt was working well before I don't have any errors.. I think making some SEO changes gonna make this error. thanks @pdobrev I'll be watching your solution.. If I find anything before you I'll forward it too..

👍 1
8 years ago

I looked at your site's source code and compared the landing page with a menu item.

The home page shares well, except for the og:image element, because there the url doesn't exist, but that's not the main point.

I checked the Stroganof menu item and tried sharing it with the same result as you. When I checked the source code, there was no description, title, url or image metadata... if you are creating the data in the backend, it's not showing up in the final html document.

That's a bit different to my problem. With my site, the metadata I attach to each post actually show up, with the exception of the description and og:description... Despite having manually set those to a custom strings, the cms just throws away my custom strings and autogenerates new ones from the page content. Weird... really weird.

8 years ago

Where does this {{ page_url }} comes from?
Grav variable is usually {{ page.url }}. Maybe you could try switching to this variable?

Edit: When building an url, you might also want to use sometime the url_encode filter: {{page.url|url_encode }}

8 years ago

@paul:
{{page.url|url_encode }}

YESSS :) that worked :) in social buttons plugin all the files in partial has {{ page_url }} ... I switched all to this {{ page.url }} thanks @paul

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 54 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago