Fixed Some embedded tweets are not rendering

KSA

Well-known member
There seems to be and either and issue or no functionality to edit embedded media in XFMG. One of the users has embedded twitter image and the image looks so small as if it resembling thumbnail. I tried to edit the media link but the content that should be edited is not there. When I click on edit media item the link/ content on the media embeded is not showing.

Screen Shot 2017-12-24 at 8.37.03 PM.webp
 
The small image that you refer to is a thumbnail -- it's not what the Tweet is being rendered as.

The link that is visible in the image with the little tweet icon is what we're actually rendering. I think there could be issues here, generally, with the way we're rendering Tweets.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

This one isn't rendering for me when I try it locally.
 
I haven't identified the perfect fix for this yet, but this is the cause:
(This should be provided as a String, since Twitter IDs are generated from 64-bit integers, and JavaScript integers are limited to 53 bits.)
There are some situations where this is being provided as a string and some where it's a number. I'm not actually sure the rhyme or reason yet. I can cast it back to a string when calling createTweet and that resolves it, though if it's ended up as a number initially in our JS code, that might be a problem so we may need to see if we need to take an approach to force it to a string in a different way.
 
The reason this happens is within jQuery and its parsing of data attributes to what it thinks is the correct type. As Twitter is pretty particular about passing in a string, we just need to cast to that first.

So this is now fixed for 2.0.2.
 

Similar threads

Top Bottom