XF 2.2 Twitter (now X) no longer auto embedding

nodle

Well-known member
It looks like Twitter (now X), is having new post come from X.com instead of Twitter.com, this is now breaking auto embeds. Anyone have a fix, or so we have to wait for an Xenforo update?
 
I would caution against creating a duplicate media site as a workaround; that has long-term side effects that may not be immediately obvious:
  1. You can never delete the media site without breaking existing posts
  2. You now have to maintain a second media site by hand instead of relying on updates from the XenForo team
  3. If you leave the vanilla media site enabled, you'll have two competing media sites once the XenForo team updates the match URLs for the vanilla media site
I couldn't find an existing bug report for this, so I've opened one. It's a quick fix from XF's end.
 
Honestly media sites should be upgradeable without requiring a software update. Just like support for adding new emojis.

For media sites, there is a fantastic addon available here with an amazing developer. Emojis on the other hand 🤷
 
Honestly media sites should be upgradeable without requiring a software update. Just like support for adding new emojis.

For media sites, there is a fantastic addon available here with an amazing developer. Emojis on the other hand 🤷
Add-ons are effectively the way to go about that. You can also put the site in debug mode if you want to do it by hand, or you can manually edit them in the database. Using an add-on ties your updates to the add-on dev, whereas updating the vanilla entry keeps you on the XF update path. Manually creating a media site shifts the maintenance to you, so I consider that to be the least desirable option. But to each their own.
 
Yeah I mean it could be an official addon by xenforo to allow modular updates for smaller things like Twitter using x.com domains suddenly. It could be updated by the official upgrader or people can update it manually between updates. Helps out for folks who are stuck on an older update for whatever reason.

I mean xenforo.com hasn't even fixed the orientation bug on their pwa here for months now. Assuming they consider it a bug. If my own pwa was stuck on this, I would be very annoyed. It's really hard to manage without third party add-ons or manual changes in such cases.
 
Actually doing that in a way that wouldn't require a full XF update would require breaking changes to how XF handles updates in general, so I don't think we're going to see that on 2.x. Media site changes are infrequent enough that they might as well just be bundled alongside all the other minor fixes that come with revision releases.
 
Match URLs:

Code:
x.com/*/status/{$id}
x.com/statuses/{$id}
twitter.com/*/status/{$id}
twitter.com/statuses/{$id}

Embed template:

Code:
<xf:page option="jsState.twitter" value="{{ true }}" />
<xf:js src="xf/embed.js" min="1" />

<div class="bbMediaJustifier bbCode-tweet"
      data-media-site-id="{$siteId}"
      data-media-key="{$id}"
      data-xf-init="tweet"
      data-tweet-id="{$id}"
      data-lang="{$xf.language.language_code}"
      data-theme="{{ property('styleType') }}"
      ><a href="https://twitter.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://twitter.com/i/web/status/{$id}</a></div>

This just results in a blank embed for me, even just using the X.com URLs. Any ideas?
 
Back
Top Bottom