SketchFab Embedding Issue

Hi,

I wasn’t entirely certain where to turn for this one, so I thought I would ask here to see if anyone else is experiencing any problems.

I am a moderator on a hosted Discourse forum (https://community.gamedev.tv) and SketchFab was enabled so that users could simply paste in the full URL from that website and their 3D models would be embedded within the Discourse posts. It had been working really well for ages, you could zoom in/out, spin the 3D model around without having to leave the forum - fab.

It just recently when I noticed that someone had posted and it wasn’t working, instead adding a kind of thumbnail of the 3D model, some text and a link to the SketchFab site to view it. I knew that it was possible to not get the desired result if there wasn’t a blank line above and below the pasted URL, and also knew that there mustn’t be any other text on the line with the URL, so I went and checked, but this didn’t resolve the issue.

What is more confusing is that previous posts where this was applied are working perfectly well, but if I take a URL from SketchFab and try it in a new post I seem to get mixed results.

I am not an Administrator on the forum in question so have limited access to settings, although have posted hoping someone may be able to check, I believe it isn’t much more than a whitelist entry for the domain and maybe a plugin though?

I am also not a 3D modeller and do not use the SketchFab site personally, so equally I do not know if there is anything “special” you are supposed to do to enable your model to work in an embedded fashion. What I can confirm though is that if I take the URL from a post where the behaviour was as expected previously (and still is) and then post that into a new post, the behaviour changes - which seems a bit odd.

If anyone has any experience of this or can suggest anything that may be causing it, or, if you want to be awarded my virtual Gold Star actually solve it - that would be fairly awesome.

Thanks for reading :slight_smile:

Kind regards

Rob

Hey Rob, do you have an example URL of sketchfab so I can debug this?

2 Likes

Hi Falco, thanks so much for such a prompt response - really appreciated :slight_smile:

Sure… not sure if you want the URL of the posts on our form or of the specific SketchFab URL, so I will provide both…

Here is a link to a post where I was testing to see what was happening, using URLs from our original posts (which worked) and then more recent ones (which didn’t)…

https://community.gamedev.tv/t/sketchfab-test/11802/2

You’ll notice on that post that the second item down (the police car) is thumbnailed… yet if you follow the link in the text below it where it says “Original Post”, you’ll see that the very same URL produces a large version of the 3D model embedded into the post itself (desired behaviour).

This is the specific URL for that model on the SketchFab site:

hmm… ok, your forum is rendering it now as a thumbnail also… erm… hang on…

https://sketchfab.com/models/303974fd05a74dd184e6376b995cd7f6

Right, at least you can see the full URL if I do it that way…

What I’m not sure of is whether it’s a change in functionality via Discourse (which may explain why older posts are still ok), or whether it’s a change at the SketchFab end (but that wouldn’t explain what’s going on with this police car specifically, where it’s ok in an older post and not in a newer one).

Again, not being an Admin I can’t provide an details of settings from our config - sorry.

1 Like

Hi Rob,

I work for Sketchfab and noticed your issue. We’re using Discourse as our forum too and haven’t noticed any changes in behaviour. That said, we’re still on version Discourse 1.6.4. Sketchfab embeds should work exactly as you describe, but you’ll need to configure our domain in the onebox domains whitelist - adding ‘sketchfab.com’ should do the trick.

I tried the URL you provided and it worked fine on our forum.

If you want, I can sign in to your forum and give it a try?

2 Likes

Hi Bart, thanks for the reply - blimey, I wasn’t expecting to get all of this support so quickly fab! :slight_smile:

I’m not sure which version we have running, all I know is that its a hosted solution, Jeff (@codinghorror ) has previously popped across and checked a few things for me in the past, so I’m guessing its part of a shared hosting solution via Discourse.

I’m pretty certain the onebox domain is set, when the forum was first set up we were all amazed at how fantastic is was to have the SketchFab embeds working, and as I have several posts on the forum where they are still working I’m guessing it’s still in place.

Thanks for trying the URL, it’s good to know it works.

That leaves perhaps the versioning then as being different. Are you on a shared hosting solution also or a separate install? Again I don’t really know how it all works but I’m kind of assuming that as part of a shared solution, each site on it would be updated to the relevant version at the same time, so if you are then I’d have thought yours and ours would be the same? Maybe not.

More than happy for your to sign in on ours, I don’t have any special access I can grant or anything though so you’d have to register an account I guess, so please, only if you have time, I already appreciate you replying.

The thumbnail approach obviously is ok, but I’m trying to put the whiz/bang back on :slight_smile:

Kind regards

Rob

Update

I have just used “View Source” on this page and noticed this;

<meta name="generator" content="Discourse 1.7.0.beta8 ...

When I did the same on our forum it was the same, I suspect then we are on different versions. Whether that is the cause of the issue or not I’m still not 100% certain as the older posts still display the full 3D embed correctly. hehe… this would normally be a “Friday afternoon” problem! :smiley:

One theory is that for some reason your forum had a problem downloading the embed code when the post was first created, and that it held on to that version in its cache. I’ve gone ahead and created a new post with a different URL in your test thread. It’s held for approval now - could you clear it?

We’re on a shared hosting solution, but probably with another provider. Still, oEmbed is fairly standard, I’d think it should work anywhere…

1 Like

Yeah sorry, I just spotted that - it’s approved… it appears as a thumbnail version also…

Just wondered whether maybe there is a difference in the way that the URLs are being transformed between your 1.6.4 and the 1.7.0? Presumably the same link you popped on our forum will behave the same way here as a reply to this, but on your own forum will render the full 3D model…?

Thanks! And yes, it renders the same way here:

This leads me to believe that sketchfab.com is probably not added to the onebox domains whitelist - I think that should be your starting point.

1 Like

I will go prod one of the admins and see if they can spare a moment to check for me… alas I do not have the powaaah myself… sniff

So, assuming this was the case… any thoughts on how the other ones are still working? It certainly would have been whitelisted initially. When you mentioned about the caching above, does that mean that there is something else that you don’t see actually in the posts which is still stored within Discourse which enables the embedding to work? If so I can appreciate how it would have worked, then stopped if the whitelisting got changed, and now doens’t if it isn’t there etc…

Yeah I suspect something like that. But let’s make sure the settings are correct first :slight_smile:

1 Like

Hey @RobMeade and @bartv we are taking a look at this, please don’t change anything at your boards yet.

2 Likes

Just ensured that we use oembed for sketchfab models :wink:

https://github.com/discourse/onebox/commit/f8be8d06a1b6aaae5d948c57bc73539a759f1f34

4 Likes

What do you mean? Is Sketchfab now whitelisted by default?

1 Like

We recently removed the whitelist and will now try to onebox everything.

I just ensured we use the oEmbed version for Sketchfab rather than the OpenGraph :wink:

5 Likes

oooh… so maybe some changes might have triggered this… cool - at least we’re going in the right direction :slight_smile:

Just a quick thanks to everyone who’s involved at this time… I will go back to our admin and ask him not to change anything :slight_smile:

2 Likes

Just noticed the update above this post with the GitHub update etc and wanted to ask, if the above fixes the issue, any ideas on timeframe? I appreciate how that probably sounds like “me, me, me, meeeee” but I’m not familiar with the release schedules for Discourse, so not sure how often you push out updates… just be nice to let the people on our forum know for example if we might see the issue resolved in a couple of weeks, or whether it might be a month because of scheduling etc…

Thanks for any further info :slight_smile:

You got this update two hours ago :smile:

PS: URLs are cached for a while, so every URL that was oneboxed recently will still show the old onebox. You can bypass this adding ?v=1 to the end of the URL.

4 Likes

LOL…

/facepalm…

See, I wasn’t quite sure what the "I just ensured we use the oEmbed version for Sketchfab rather than the OpenGraph " meant, as in, I’ve just tested it, I’ve fixed it… I did go back and refresh the page and saw the OpenGraph boxes still so assumed it wasn’t live yet…

And now the ?v=1 thing makes sense… I was messing with that over there thinking you’d implemented something super-clever, and then I thought I’d broken it when I could put anything on the end… lol…

What a day I’ve had! lol…

Ok, so BIG thanks are in order and are given, thank you ever so much for dealing with this so promptly, and for everyone who has been involved in this today… REALLY appreciated - I will now spend the evening updating some URLs! :smiley:

3 Likes