Onebox no longer works for my wordpress site

Continuing the discussion from Did onebox change? They're not showing for my main site any longer:

Not sure what’s going on here or if it’s related to this topic, but my site used to onebox beautifully in discourse - it no longer does as of a week or so, even here on meta. I just updated my discourse to tests passed… no dice. No changes recently on the wordpress site until we updated some plugins today.

Example URL that should onebox:

https://namati.org/resources/childhood-statelessness-in-south-africa/

Are you on latest?

There were these two issues prior

2 Likes

Thanks @cpradio! Yes, I am on latest… I updated after reading these posts shortly before starting this topic. Also, it doesn’t work on meta either as you can see above.

The OpenGraph data looks OK to me, any ideas @eviltrout?

http://iframely.com/debug?uri=https%3A%2F%2Fnamati.org%2Fresources%2Fchildhood-statelessness-in-south-africa%2F

1 Like

Could be because of HTTPS? Though an analysis of the certificate shows that everything should be fine…

Did you look at the logs in your dashboard? If onebox fails it should write something in the log…

I just pulled onebox and manually added namati.org to https://github.com/discourse/onebox/blob/master/lib/onebox/engine/whitelisted_generic_onebox.rb#L18

So if something is broken it’s probably not directly related to the domain.

2 Likes

Given https://github.com/discourse/discourse/blob/master/lib/onebox/engine/whitelisted_generic_onebox.rb#L9

It will return true for namati.org so the domain should be automatically whiteslisted as far as I understand onebox at the moment.

That site seems to be returning nothing for our custom user agent Discourse Forum Onebox vXXX

If I use Ruby like the onebox does outside of Discourse the onebox works fine.

So this must be the result of our new user agent string.

5 Likes

So maybe I need to check with my wordpress host, wpegine, about accepting this user agent string?

Yes that would be a good thing to do. It’s curious they accept Ruby but not ours.

2 Likes

OK, looks like my problem is solved. From wpengine chat:

Yep it does look like it came and got a 200 OK! I added a rule to your server config file to outright allow the user agent.

I can confirm that it’s now working again - also in the OP above which I just edited as a test. :rocket:

6 Likes