XF 2.2 Amazon unfurl

AndyB

Well-known member
If I get a random Amazon URL and paste it into a message here on xenforo.com, it unfurl's correctly. Yet if I try the same URL on other forums running XF 2.2.4 it does not unfurl. Has the code here on xenforo.com been recently updated in regards to unfurl'ing? Or is there another variable involved which would account for this?
 
We have been getting complaints that Amazon URLs are being converted to Media and AdBlock is making them disappear:

1639152123880.webp

The Amazon URL be being converted to:
Code:
[MEDIA=amazon]B07YFR5BLN[/MEDIA]

Here is a live example. Pasting this URL on a blank line:

https://www.amazon.com/SecurityIng-Flashlight-Underwater-Photography-Fluorescence/dp/B07VQSLM6Z

Produces the media link conversion:

[MEDIA=amazon]B07VQSLM6Z[/MEDIA]

Clicking on the autogenerated Amazon image link results in a considerably different URL.

https://www.amazon.com/dp/B07VQSLM6Z/ref=as_sl_pc_tf_til?tag=&linkCode=w00&linkId=&creativeASIN=B07VQSLM6Z

Here is a link to one of several threads in our Site Support forum:

 
If I get a random Amazon URL and paste it into a message here on xenforo.com, it unfurl's correctly. Yet if I try the same URL on other forums running XF 2.2.4 it does not unfurl. Has the code here on xenforo.com been recently updated in regards to unfurl'ing? Or is there another variable involved which would account for this?
I would echo @AndyB question:

"Has the code here on xenforo.com been recently updated in regards to unfurl'ing? Or is there another variable involved which would account for this?"

Changes were made, obviously, either in the addon or in Xenforo, or Amazon's API, Ad Blocker, etc. Yet, it used to not be an issue before, I could run Ad Blocker AND see Amazon products thumbnails.

These are the questions:

1- Where, what and why?

2- And how do we fix it so it operates as before?

Amazon's links being used for so many things daily, I'm not hot on requiring users (or forum owners) to now use workarounds that are clearly only band aids. Is there a permanent solution?

Pasting Amazon URL in post.

429b512ab89ab6c93253d959adda75cf.png

How the code is processed:

53b23e5cc47c7a8891029a4c4d39bba8.png

How the link displays.

009c020223509c276b9e7d7d02dd7071 (1).png

This is how an Amazon link displays on Xenforo (simple copy/pasting an Amazon link below):


Is this a bug?

Thanks,

Andre
 
Last edited:
This is not my case, but imagine a forum board allowing AFFILIATE LINKS. This situation is killing all visuals from appearing, and so posts make little sense. People won't see anything, only a blank space, so they will scroll along.

I don't see ourselves requiring forum members and visitors to disable ad blockers to visit or participate in a forum. Unless the forum has monetization ads, which is not our case.

Scratching my head, here...
 
We have been getting complaints that Amazon URLs are being converted to Media and AdBlock is making them disappear:


The Amazon URL be being converted to:
Code:
[MEDIA=amazon]B07YFR5BLN[/MEDIA]

Here is a link to one of several threads in our Site Support forum:


If only Amazon links behaved like other links. Like this you posted:



9f81ee48cc6677f94f491bcea96eba2a (1).png

An Amazon link would just disappear, now... Somebody did something to mess all this up.
 
We have been getting complaints that Amazon URLs are being converted to Media and AdBlock is making them disappear:
It sounds like you or an add-on you've installed has added an Amazon BB code media site to your forum. XenForo doesn't ship one by default, and the same behavior isn't exhibited here as you can see.

"Has the code here on xenforo.com been recently updated in regards to unfurl'ing? Or is there another variable involved which would account for this?"
No, nothing has been changed. The reason Amazon URLs aren't unfurled is typically either their pages are so bloated that XF has trouble extracting metadata from them, or Amazon is blocking the request entirely. The end result is that the URL appears as linked text rather than being expanded in any way, which is different from the behavior you're observing.
 
It sounds like you or an add-on you've installed has added an Amazon BB code media site to your forum. XenForo doesn't ship one by default, and the same behavior isn't exhibited here as you can see.


No, nothing has been changed. The reason Amazon URLs aren't unfurled is typically either their pages are so bloated that XF has trouble extracting metadata from them, or Amazon is blocking the request entirely. The end result is that the URL appears as linked text rather than being expanded in any way, which is different from the behavior you're observing.
In truth I'm using the S9e Media addon, for years. But this is the first time I notice this. Others have noticed it before. I contacted them but they don't know, only suggest turning Ad Blocker off. However, it used to work as expected before.

It could have been done by Amazon to get around Ad Blockers.

If only there was even just a link, but nothing shows at all. It breaks the flow of the forum's appearance and the usefulness of posting Amazon links.

Then there is this that was pointed out by the addon developer:


 
In truth I'm using the S9e Media addon, for years. But this is the first time I notice this. Others have noticed it before. I contacted them but they don't know, only suggest turning Ad Blocker off. However, it used to work as expected before.
The media site on the page you linked is embedding a frame from assoc-amazon.com which is on at least a few ad block lists. So if it worked before it was either because it embedded a frame from a different (non-blocked) URL, or because the URL did not used to be on those block lists.

It's worth noting that assoc-amazon.com is (usually?) an affiliate URL, so the latter seems unlikely.
 
It's worth noting that assoc-amazon.com is (usually?) an affiliate URL, so the latter seems unlikely.
I've just installed the add-on to double check. It looks like there are options for an Amazon affiliate code but you can leave them blank, meaning the embeds are not technically affiliate links but they are still embedded from the affiliate program (and thus blocked by ad blockers, which is perhaps a bit overzealous when no affiliate ID is included).

There's not a lot you can do about this aside from contacting the pertinent block list maintainers to see if they can exempt embeds without an affiliate ID. As a fallback, the add-on does provide this option:

screenshot-Rc0KJf.webp
 
The media site on the page you linked is embedding a frame from assoc-amazon.com which is on at least a few ad block lists. So if it worked before it was either because it embedded a frame from a different (non-blocked) URL, or because the URL did not used to be on those block lists.

It's worth noting that assoc-amazon.com is (usually?) an affiliate URL, so the latter seems unlikely.
Thank you Jeremy,

So on our own forum, here are two URLs in the same thread. One shows a "preview." The other (Amazon) is posting a blank space. However looking at the URLs code, one is an unfurled URL, while Amazon converts to a media embedding code.

Code:
https://vi-control.net/community/threads/usb-c-thunderbolt-3-to-multiple-m-2-nvme-hub.116641/post-4956431
 
[URL unfurl="true"]https://eshop.macsales.com/shop/express-4m2[/URL]

https://vi-control.net/community/threads/usb-c-thunderbolt-3-to-multiple-m-2-nvme-hub.116641/post-4956620

[MEDIA=amazon]B07Y4F5SCK[/MEDIA]
 
So on our own forum, here are two URLs in the same thread. One shows a "preview." The other (Amazon) is posting a blank space. However looking at the URLs code, one is an unfurled URL, while Amazon converts to a media embedding code.
Yeah, the add-on you've installed is responsible for that conversion. Note that without the conversion, Amazon URLs don't typically display the preview (AKA unfurl, which is distinct from [media] embeds) for the reasons I mentioned above. They will generally display as plain linked URLs (as seen in your posts here).
 
Yeah, the add-on you've installed is responsible for that conversion. Note that without the conversion, Amazon URLs don't typically display the preview (AKA unfurl, which is distinct from [media] embeds) for the reasons I mentioned above. They will generally display as plain linked URLs (as seen in your posts here).

I see, OK, but if I disable my Ad Blocker, here is what I see (and would like to see without disabling the Ad Blocker):


7c1d5b8d8c20ad56345d298abf7e9b13.webp

:confused:
 
I see, OK, but if I disable my Ad Blocker, here is what I see (and would like to see without disabling the Ad Blocker):

There's not a lot you can do about this aside from contacting the pertinent block list maintainers to see if they can exempt embeds without an affiliate ID. As a fallback, the add-on does provide this option:

View attachment 262127

There's nothing XenForo or the add-on can do about that. Your ad blocker alone is responsible for blocking the embeds and there isn't really any way around that. Your options are:
  • Use the option in my post above as a fallback (and accept that you won't see the embed with ad block enabled)
  • Contact the block list authors to make an exemption for embeds without an affiliate ID
  • Disable the media site and use plain linked text (but at that point you might as well just enable the option instead)
 
There's nothing XenForo or the add-on can do about that. Your ad blocker alone is responsible for blocking the embeds and there isn't really any way around that. Your options are:
  • Use the option in my post above as a fallback (and accept that you won't see the embed with ad block enabled)
  • Contact the block list authors to make an exemption for embeds without an affiliate ID
  • Disable the media site and use plain linked text (but at that point you might as well just enable the option instead)
Thank you for everything, Jeremy. I'm sure your replies will be helpful to others as well.

I contacted the Ad Blocker developers and will see what they say.

I also enabled the option:
  • Add a link to Amazon product embeds - Adds a generic link to the product as a fallback if Amazon is blocked by the browser.
Cheers,

Andre
 
Back
Top Bottom