Onebox try to fetch favicon with relative URL instead of absolute URL

Hello,

It try to fix a strange behavior, when I copy a link from a site I manage, the one box is appearing, but the favicon url is not correct, as an example:

The favicon URL of the site is https://www.openmandriva.org/squelettes/icons/favicon-32x32.png (I even put the absolute URL in the head) as it can be seen in the source.

But Discourse try to fetch a favicon relative to the post URL, ie https://www.openmandriva.org/it/notizie/article/la-migliore-di-sempre-rilasciata-omlx-4-0/squelettes/icons/favicon-32x32.png, and as a result, the link is broken.

What should I do to fix it?

1 Like

I don’t see a favicon in that example. Can you provide an example with a broken favicon?

3 Likes

Looks like we are removing the broken favicon image when post processing. I can repro the issue in composer preview. Will investigate and fix.

4 Likes

I can not reproduce the broken favicon anymore here on meta or on my dev instance. Did you fix something on your end @ashledombos?

1 Like

I did not touch anything, that’s really weird because here above also the icon appears in onebox :hushed:

Edit: In fact I maybe get an idea, but I don’t know if it’s a start of an explanation: I changed the generic template in order to have favicon absolute URLs in heads, and forced this particular page to update the template, but not other pages (which were to be updated later depending on their cache expiry)… Maybe discourse get the favicon information from the non updated landing (root) page source and not from the pasted URL source itself?

1 Like