Not a bug Link Unfurling Misbehaving on a Custom Page with the bb_code Function

Affected version
2.2

Ksentile

New member
I'm having strangely inconsistent behavior with the bb_code function on a custom page, which affects one manner of link only. It affects url unfurling by not creating the usual link unfurling box, but only constructing a http(s) link.

There's nothing more complicated than regular HTML styling in the page outside of the {{ bb_code("[URL unfurl='true']{link}[/URL]", null, null) }} element.

The link refers to a category page. I have set it with a bi-directional custom route filter, but referring with the original category/{id} address or disabling the filter makes no difference. I checked that the same problem persists for other category pages.

It's an annoying little problem which I could probably circumvent by copy-pasting the HTML code directly, but I would rather understand why the software is behaving like this. It seems like a bug.
 

Iggy

Well-known member
we have a similar issue, turned out to be a result of the link not being "publicly available"....which is a condition for the unfurl to apply...perhaps that might help you idk..

regards
 

Ksentile

New member
@Iggy What do you mean by "not being publicly available"?

My linked categories have "Display in the node list" marked on.

I have checked that the link type works fine on my regular forum posts, so I'm a bit lost what you could mean by public availability.
 

Iggy

Well-known member
for example a private forum/area would not be "publicly available" ....if google cant see it its not public...something along those lines, not sure exactly what all you got goin on but i know that for sure will fail the unfurl
 

Ksentile

New member
@Iggy None of these linked categories are set to be private.

Thanks for the thoughts, hopefully they will be helpful when the staff investigates the matter.
 

Mike

XenForo developer
Staff member
The short answer here is that what you're doing isn't really expected. Unfurling is part of an automatic process in the auto linking system and it requires additional data changes to be triggered internally. In this case, specially to flag the unfurl as pending. We would alos generally expect a mapping of unfurled URLs to internal unfurl IDs to be passed into the BB code parser, though that's not totally required.

Note that we do try to look up details about an unfurl by URL if there's no mapping, so it's possible some URLs may work if they have a corresponding unfurl record already.

So if you want to do something like this, you would need additional code to trigger internal actions whenever this URL changes.
 
Top