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?
 
I can't edit the existing media site (as can't enable debug mode, long story!) but I assumed I could work around this by adding a new media site for X.com but it doesn't seem to work either.

What's wrong here? I've tried x.com and twitter.com in the template and neither work.

View attachment 289942


Am using this and it embeds for me

However

When the embeded post says something like "13 replies" and I click it, it directs to the proper twitter post.

When it says "Read more on X" it just redirects to X without going to the proper tweet/post
 
Is there any update on this? I'm a complete beginner and people will want to link Twitter/X posts a lot for my news oriented forum and this not working is rather unfortunate for me. Granted I blame Musk of course.
 
Is there any update on this? I'm a complete beginner and people will want to link Twitter/X posts a lot for my news oriented forum and this not working is rather unfortunate for me. Granted I blame Musk of course.
Honestly, if you want to keep up with the frequent changes that they are doing, it's easier installing the S9 Media add-on and using it to keep up with, as XF only updates when they do a release. You can modify/add your own custom codes, but why when there is an add-on that extensively extends the media you can embed (other than being dependent upon an outside developer).
 
Top Bottom