"Onebox Assistant", crawl for those previews reliably!

Interesting. It’s working with Commits · discourse/discourse (github.com)

Breaking change in last couple of days?

1 Like

It could be my setup, we were on Commits · discourse/discourse · GitHub before I rebuilt…

1 Like

No, I believe you are correct. That’s really useful, even more recent, reduces the search :+1:

1 Like

I had the same issue, and I also believed it was resolved by uninstalling completely the plugin. Disabling it didn’t fix it.

I believe it was, in fact, because I uninstalled the onebox assistant. It has been some days ago and I can’t be 100% sure, but my issue was identical to yours, so…

Also, it is possible that my screenshot of installed plugins falsely shows what plugins were actually installed when the issue occurred. What I’m sure of is that the issue didn’t resolve after just rebuilding, onebox assistant was disabled for more than a year, and I didn’t do anything else than remove it from app.yml. I might have taken the screenshot after this rebuild and before testing again…

2 Likes

Due to the nature and complexity of the overrides, the “disabling” of the setting removes the assistance but does not remove the overrides themselves.

The plugin can be a little fragile, there is little that can be done for that (without potentially PRing a change of structure to core), though you’ve seen that it can work for quite long runs at a time without intervention, as those overrides were being applied the whole time it was installed.

You can see what the setting does by reading the code.

1 Like

Not related, but I used the plugin when rebaking all my posts after a huge import (1,6 M posts), including posts containing Youtube videos. Youtube ended by blacklisting my IP after too much embedding. Installing and enabling Onebox Assistant resolved this issue, and I didn’t need it after the rebake. I disabled it but didn’t remove it (just in case, you know). It was perfect for this task.

5 Likes

Yeah it’s good when it works, glad it was useful :+1:

Looking at it now, but can’t promise it’s an easy fix, we’ll see!

1 Like

OK the plot thickens … this is working in dev without changes with latest core …

1 Like

I’ve just updated two sites, and dev, and they all WORK. No changes have been made to the plugin :+1:

Make sure the plugin is enabled and the proxy call is always on.

image

In short, I don’t see an issue.

cc: @Canapin

3 Likes

So maybe (or surely?) it wasn’t linked to the plugin then? Honestly, when I’m trying to figure out a problem, I often lose track of what I’ve been trying or not. The problem seemed to have been resolved by itself when I noticed it had disappeared. A mystery that will remain a mystery.

Thanks for your amazing job anyway Robert, as always. :+1:

4 Likes

Dang, I’ll re-add this plugin next rebuild and hopefully it was just some temporary weirdness. Thanks again and sorry for the goose chase!

2 Likes

No worries, it’s always good to take a look at this plugin once in a while.

And on that note I’ve upgraded the structure of the plugin and added a minor tweak to the overrides to take account of a one-liner change in core (but was working prior to this in any case):

Core change: discourse/lib/oneboxer.rb at main · discourse/discourse (github.com)

New commit to plugin: IMPROVE: plugin structure, minor tweak to keep up with core · merefield/discourse-onebox-assistant@4c1d9bd (github.com)

3 Likes

Update to keep up with Discourse resolving a breaking change:

Breaking change: DEV: Don’t patch Sanitize::Config · discourse/discourse@46176b7 · GitHub

Resolution: COMPATIBILITY: bring in line with changes to SanitizeConfig · merefield/discourse-onebox-assistant@8415e68 · GitHub

2 Likes

I’m trying to get this site to Onebox:

hinz.org.nz

However, I get a code of 403 when using the standard Discourse oneboxing:

I confirmed that it will deliver a onebox on embed.rocks/try, and it does:

embed.rocks/try output

Therefore, I’ve setup this plugin and configured it as in the OP with an Embed.rocks account. It works fine on other sites, but for hinz.org.nz I get no onebox and this in the console:

image

I’ve trawled this topic but can’t find anything that helps. Any suggestions?

1 Like

That’s not a Onebox. Onebox is specific to Discourse so this doesn’t prove out enough. Embed.rocks is using all kinds of special cases and workarounds that are not a mirror of what Discourse is doing. We don’t use it to generate cards, so this is irrelevant for us, and it means you can’t use this as a safe test. We only use embed.rocks to return the original page source.

Have you checked the link on the FacebookMeta dev link opengraph checker tool? Any warnings?

2 Likes

Inspired by your post, I did spend some of my Sunday refactoring the plugin as it appears the Onebox gem has migrated into Core.

I don’t believe this was your issue, though as my overrides were working I believe, but now they are more thorough.

If you could please update and test this (version 3.0) I’d be grateful:

COMPATIBILITY: improvements with changes to reflect onebox gem moving… · merefield/discourse-onebox-assistant@1d64888 (github.com)

3 Likes

Hi!
I’ve enabled the plugin, but I can’t have Facebook oneboxes working. Is that expected? Did I misconfigure the plugin?


edit: a curl returns the famous “Log in or sign up to view”, and no box is created.
So, embed.rocks uses IPs that don’t have a reputation high enough for Facebook? :man_shrugging:

1 Like

Is there a facebook embed format with a facebook api key?

1 Like

Uuuuh…
We can embed some Facebook posts for sure (only from public user profiles, not groups)… There’s also an API key used to embed Instagram posts…
But I’m not aware of something else. But there is something to be found in the developer dashboard, that’s quite a maze :man_shrugging:

1 Like

Are you sure that link is to a publicly exposed Facebook post?

1 Like