Problem/Motivation

When this module is used in conjunction with the media_entity_twitter module, pages that contain such media entities cannot be shared on twitter.

Steps to reproduce:

  • Install and enable this module as well as the media_entity_twitter module
  • Create a new media entity with the twitter provider
  • Add a new field to a content type, that references to twitter media
  • Create a new node which contains a tweet
  • Make sure that the media entity, and the shariff twitter button are displayed correctly on the new node

Clicking on the Shariff twitter button on that newly created page will not have any effect.

Proposed resolution

A few years ago the Shariff library opened the twitter sharing overlay twice. For this a workaround was added to this module, that prevented propagating events (see #2881126 and #2845000).
This is making problems now. And since that workaround is not necessary anymore, we can get rid of that whole javascript file.

CommentFileSizeAuthor
#4 3108089-4.patch4.96 KBdejan0
#2 3108089_2.patch2.36 KBdaniel.bosen

Comments

daniel.bosen created an issue. See original summary.

daniel.bosen’s picture

StatusFileSize
new2.36 KB

The patch removes js/shariff.js

daniel.bosen’s picture

Status: Active » Needs review
dejan0’s picture

StatusFileSize
new4.96 KB

Patch from daniel.bosen works fine.
Here is an updated version, it's good to have updated minimum required version of Shariff Library to v2.0.1

daniel.bosen’s picture

@dejan0 I would rather keep seperate issues in seperate patches, makes live for reviewing much easier.

criz’s picture

@daniel.bosen
I am not 100% sure, but I think its related, as there has been added a fix for the twitter issue in the 1.26 release of the shariff library: https://github.com/heiseonline/shariff/releases/tag/1.26.0
So having an updated minimum requirement is good to have.

criz’s picture

Status: Needs review » Reviewed & tested by the community
daniel.bosen’s picture

true story :-)

  • criz committed c14db83 on 8.x-1.x authored by daniel.bosen
    Issue #3108089 by daniel.bosen, dejan0: Twitter share button does not...
criz’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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

pivica’s picture

This patch is fixing an issue we had (same thing twitter button with twitter widget and no popup opening). After applying this patch problem is fixed but behavior is different. However on clicking a twitter button share page is now opened in a new browser tab instead of a new popup browser window. Probably something that is hard to fix because this is controlled by twitter widget JS code, just reporting it here for now.