our Twitter buttons sometimes fails to generate a correct URL. Instead of linking to the correct article, a URL is generated to the front page. An example can be seen in this article. What is confusing to us is that it seems to know the correct URL (it is added as “original_referer”), yet the “url” is wrong.
Hm, looks like you have a <link rel=“canonical” href="" /> element in pages which detect the link incorrectly. In pages which do detect the link, the href attribute is correctly populated. If no data-url is specified in the Tweet button, the Twitter script looks at the link rel canonical element to find the “official” URL of the page.
Looks like you nailed it, many thanks!