Conflict between 2 integrations?


#1

Hello,

On my site, I’d like to integrate the widget “display tweets linked to an hashtag” and also a specific tweet.
I’ve followed the rules but each time I validated the page, on of the 2 integration disappears.(I use a wordpress theme)
Here are the scripts I use, do you see a conflict?
Thanks for your help

<a class="twitter-timeline" href="https://twitter.com/hashtag/GetItOnWithCharliePuth" data-widget-id="690189737609543680">Tweets sur #GetItOnWithCharliePuth</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<blockquote class="twitter-tweet" lang="fr"><p lang="en" dir="ltr">For my French friends. <a href="https://twitter.com/hashtag/pleonasmes?src=hash">#pleonasmes</a> <a href="http://t.co/WLvWDNf8WJ">http://t.co/WLvWDNf8WJ</a></p>&mdash; Arnaud ADAM (@ArnaudADAM) <a href="https://twitter.com/ArnaudADAM/status/654188624083329024">14 Octobre 2015</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

#2

Could you please share a URL where we may observe the behavior? There may be script conflicts on your page beyond the isolated snippets. I was able to load both widgets on a page containing no other content.

You are trying to embed a search timeline and a single embedded Tweet. Does one or the other consistently disappear for you?

Which browser are you using as you test?


#3

I’m testing on Chrome and Firefox
Here is the URL : http://dev-yesyouweb.com/offero/campain1/ (don’t be afraid by the site I’m testing things lol)

Under the grey image, you can see with the inspector the signle tweet. And bottom right under Twitter title, must arrive the tweets flow linked to an hashtag.
Thanks for your help!


#4

Twitter’s widgets JavaScript enhances content placed on your page as it’s loaded. In the case of an embedded timeline, Twitter’s JavaScript looks for a timeline link and replaces the content with a rendered widget; a single Tweet’s blockquote is replaced with a similar rendered widget.

When I view the source code of your provided URL I see <iframe>s created, both with a DOM identifier of twitter-widget-0. The script block provided for loading Twitter’s widgets JavaScript for the timeline has been escaped into CDATA by your CMS. It looks like there are some additional attempts to act on Twitter’s supplied content by your CMS, which leaves our JavaScript confused. Which plugins have you installed which may be replacing the content you supplied to the page?


#5

I removed the Javascript and it works :slight_smile:


#6