Opened 3 years ago

Last modified 41 minutes ago

#1274 new defect

sharing in social networks always use english metadata

Reported by: saroyanm Assignee:
Priority: P2 Milestone:
Module: Websites Keywords:
Cc: sebastian, greiner, matze Blocked By:
Blocking: #1198 Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by greiner)


Linux, Ubuntu 12.04
Chrome v 37.0.2062.9

How to reproduce

  1. Open social network that uses metadata to show post description ex.
  2. Paste into the "update status" field.
  3. Wait for facebook to get metadata from the page.

Observed behaviour

facebook uses English text in description and title of the link:
Adblock Plus - Surf the web without annoying ads!
Adblock Plus is the most popular adblocker available for Firefox, Chrome, Opera, Safari, Android and Internet Explorer. Block all annoying ads all over the ...

Expected behaviour

Facebook should get metadata from German version of the website:
Adblock Plus - Für ein Web ohne nervige Werbung
Adblock Plus ist der beliebteste Adblocker für Firefox, Chrome, Opera, Safari, Android und Internet Explorer. Blocken Sie jede nervige Werbung im Internet...

What to change

Modify <link rel="canonical" href="{{page}}"> in templates/default.tmpl in repository to reflect the following URL pattern:

  • Homepage:{{locale}}
  • Other pages:{{locale}}/{{page}}

Change History (16)

comment:1 Changed 3 years ago by saroyanm

  • Ready set

comment:2 Changed 3 years ago by saroyanm

  • Blocking 1198 added

comment:3 Changed 3 years ago by sebastian

  • Priority changed from Unknown to P3

comment:4 Changed 3 years ago by greiner

I'm not sure whether the behavior described in this issue can be reproduced which is why I base my comment on the original issue report in #1198:

This happens because we're including <link rel="canonical" href="" /> on the homepage to avoid having duplicate content in search results. Facebook's crawler follows that link to only fetch data from the canonical page which is in english. The german title is provided by the extension.

We could change the canonical link to include the language as we did with the <html> element in global.tpl.php. Keep in mind that the canonical link only applies to the homepage so adding it to global.tpl.php is not a solution.

comment:5 Changed 3 years ago by greiner

  • Cc greiner added

comment:6 Changed 21 months ago by matze

  • Cc matze added
  • Tester set to Unknown

Can you still reproduce this now that we use the custom CMS?

comment:7 Changed 21 months ago by greiner

Yes, this issue still exists.

comment:8 Changed 21 months ago by matze

Very well, then can we fix this now in similar manner to the one you suggested before?

comment:9 Changed 21 months ago by greiner

The suggested solution should still work, yes. Not really related to the Infrastructure module, however, rather Websites and/or Sitescripts, since the suggested solution only requires changes to the HTML code.

I'll do a bit of investigation to find out what exactly needs to be changed and update the description accordingly.

comment:10 Changed 21 months ago by greiner

  • Component changed from Infrastructure to Websites
  • Description modified (diff)
  • Ready unset

comment:11 Changed 17 months ago by juliandoucette

Both the canonical url and the og:url are hard coded to As a result, Facebook will always query the og:url and get English results.


As a side note: It looks like the German og:description has not been translated yet.

I think this should be "ready" and a higher priority.

Thoughts saroyanm?

comment:12 Changed 17 months ago by sebastian

We added <link rel="canonical"> specifically, to remove the language prefix (e.g. from Google search result lists). Otherwise, we could simply omit that tag as well. But I'd rather keep it like that, in favor of cleaner URLs on Goolge, etc.

Wouldn't it be sufficient to just change og:url?

comment:13 Changed 7 months ago by juliandoucette

  • Priority changed from P3 to Unknown

comment:14 Changed 2 months ago by juliandoucette

  • Priority changed from Unknown to P2
  • Ready set

comment:15 Changed 3 weeks ago by juliandoucette

  • Owner set to juliandoucette

comment:16 Changed 41 minutes ago by juliandoucette

  • Owner juliandoucette deleted
Note: See TracTickets for help on using tickets.