Link preview when tags are missing is misleading

There I was just the other day, re-editing

and the preview was looking great:


But upon saving my edit, well… “Hey, bogus, man.”
That sharp looking link preview you see in the right half of the screen
was no more! We’re talking “bait and switch.”
Apparently a post can only have one big link preview. Fair enough.
But then the right side of the screen should not get the
user all excited about something that is not about to happen.

So, please show the second etc. link previews the same way they will look when the edit is saved.

OK, you are probably only rendering part of the page so have lost track of which link preview this is, (first or not first)… but that’s bad.

Thanks.

Checking this out:

Update! The cat is joining Green Peace!

Not sure I can repro, can you provide exact steps?

I’m not sure if this fits into this topic, since this seems more like a feature request, but I like the idea that when a onebox fails because some tags are missing, the link is shown as an inline onebox instead of the raw link.

So when I post:

https://osmfoundation.org/wiki/Trademark_Policy

The preview looks like this:

But the link in the post looks like this:
https://osmfoundation.org/wiki/Trademark_Policy

It would be prettier if the link would use an inline onebox and look like this:
Trademark Policy - OpenStreetMap Foundation

You need to go back to your post / reply and now insert a second link.

In the right side it will be expanded. But when you save the edit, it won’t.

P.S., I didn’t even look at what the words were. All I am talking about is that there is a several row high box, vs. a one liner.

I’m going to guess here, but it looks like the URL you linked is missing the tags discourse needs to expand it, as it says:

Sorry, we were unable to generate a preview for this web page, because the following oEmbed / OpenGraph tags could not be found: description, image

Which is why it looks like it’s oneboxing, but it’s actually not because the tags are missing.

1 Like

Maybe it would help if Instead of a preview, only a link will appear in your post. :cry: would be added to this text.

1 Like

The other thing that can cause this is if the browser is able to read the url (maybe you’re logged in there) but discourse is denied access. Discourse can also get rate limited. Since the preview is rendered by the browser and the post gets rendered by discourse there isn’t much way to avoid this.

2 Likes

Could someone translate this in easy-english, because here must be now a language barrier.

What second link? OP is showing only one link.

So is the issue:

  • onebox fails because of missing tag
  • if there is two links, then the second one is somehow broken

From my understanding, the count of links isn’t at play here, it’s just the pseudo-onebox that’s causing confusion about the oneboxed state of a link. (But also yes, there’s only one link that we can see)

5 Likes

I will try to summarize what I understood
@jidanni posted at a Discourse forum. This post, which he shared a link to, contains two links. But the onebox only works for the first one. The second one shows in the preview of the composer that no preview could be generated.

3 Likes

Now I get it. So first we have to go and see what happened, then come back and re-read the question.

But the question is why a link stays as literal link, not change it automatic to formatted link when oneboxing fails. And in some cases user doesn’t know what format is in use.

I would say the title of this topic would need some love and caretaking :smirk:

1 Like

Indeed, hopefully @jidanni agrees that the problem is not link count but onebox failure, which can happen for any link. Almost always because of the target site’s setup, in my experience.

@jidanni please update the topic title!

And I agree with @Moin , a better design would be to rewrite the link as a rich link, or “inline onebox”:

3 Likes

I’m very thankful that everybody’s hot on the case.
Maybe some supervisor could edit the title, as all these concepts are over my head.
All I know is sometimes things look different in the side by side preview, than when the post is completed.