"You can’t embed media items in a post" - Huh?

There are some attempts at posts at some times that elicit this error message. But at other times embedding urls that point to images or to pages containing images works just fine.

Lots of users have questions about these events. And about the best answer our homegrown power users have is “It does that sometimes” and “You’re doing something wrong.” Which is pretty unsatisfying.

It would be nice if @codinghorror or one of the other insiders can tell us exactly what that message is trying to say. What scenarios trigger it and what’s the workaround? What are people doing wrong when they provoke this message?

I get that sometimes. Once I was posting from the phone, got the message, went to a nearby desktop, recreated the exact same post, it went through.

That’s a question for the site admins, apparently they wanted a board with no embedded media whatsoever, like an all-text board?

Is that how the old boards worked? I didn’t spend enough time there to know.

On the old boards we had no ability to upload content of any kind. And while you could post a url to anything, they would always render as <a> tags, and never as <img> tags.

Discourse of course can render some URLs as a “one box”, renders most urls as <a> tags, but renders some urls as <img> tags. Which results in a visible image embedded in the text.

I suppose the clearest question I can ask at my current state of knowledge is “Under what circumstances will a url included in a post render back as an <img> tag instead of as an <a> tag?”

And again, what is the specific technical conditions that provokes the title error message. Because I/we can’t come up with a consistent repro for it.

Yes, there is a difference between uploading content and pointing to content, and depending what browser / OS you are using, you / it will try to do one or the other.

The settings here, to me, indicate the Powers That Be™ wanted to limit the site to all-text.

Unfortunately that’s tough to do in Discourse because it’s … not really a scenario we explicitly designed for. So it’s partially in effect here but there are ways around it.

Nope. That is in no way whatsoever the issue.

I don’t know enough to know if these posts are related but in case they are, I’m linking them here.

Here is what happens. Say you are in a CS thread about “favorite YouTube (topic x) video”. The thread is full of embedded YouTube videos. You attempt to post a video by putting the YouTube URL in a post exactly as every other successful video in the thread has been done and exactly as you have done successfully yourself many times in the past and you get that error message. It isn’t about you doing something wrong, it is about seemingly random failures by Discourse itself.

Or, as posted above, you walk over to a different computer, using a different browser, and a different OS, and you think you are somehow doing exactly as you did before.

That isn’t about discourse: it’s about a fundamental misunderstanding of the way computers work.

I’m not saying that Discourse works correctly: but as long as people keep mixing up apples and oranges, they are going to get fruit salad, not an explanation or a fix.

I think, if I understand codinghorror correctly, the point is that the behavior is a little buggy because the admins are trying to achieve something (a text-only experience) that the software isn’t designed to support.

Look, I am not stupid. I know what I am doing and I know what I am talking about, and what you are saying is irrelevant, useless, and wrong. You are not helping.

And clearly, what you are saying is helping.

This is correct as far as I know. Images were turned off, but then we discovered that posting an external image URL would still work. Rather than attempt to figure out how to stop that, we were told to just try it out and see if it was okay.

It seemed no one abused the image feature (which was the reason it was shut off before–due to goat.se, in fact), so we kept things the way they are now.

The issue being reported, however, is just that sometimes Discourse won’t make a thumbnail of a particular site or image or video, and it returns this error.

My suspicion is just that Discourse fails to import the thumbnail, and then gives out a “You can’t embed media items in a post” error instead of a more correct “failed to retrieve thumbnail, please try again” error.

Perhaps this is due to the attempt to block media uploads. I could see that messing up an error handling routine.

Let’s not get personal. Both of you please drop the attacks back and forth.

What is being done is very simple.

  1. Copy video/photo URL.
  2. Paste into response box.
  3. Press “Reply”.

As simple as that. It works most of the time, but sometimes doesn’t, and doing the absolute exact same thing on a different browser works.

My guess is it’s these two things combined. The admin of the SDMB tried to block images, and because Discourse isn’t designed to do that, the admins of the SDMB came up with a script of some kind that doesn’t block all images, only some of them.

I think it’s worth evaluating what the actual goal is here:

  • Is the goal to enforce a completely text-based, image free discussion?

  • Is the goal to discourage images in discussion?

If it is the latter, I think the status quo is… working about as ok as it’s ever gonna work, since this is not a scenario we ever designed for, honestly.

(I personally don’t agree with this goal because I believe it’s unrealistic to have an image-free discussion on today’s internet… but I am not in charge here.)

Whose goal? I don’t know what the goal of the admin was here originally, but it’s not the goal of at least some of the mods to have image free discussion or even discourage images in discussion because they’re asking how to add them.

Maybe the mods could get together and let us know what their goal about images is.

Are you referring to me? I’m just trying to be helpful in this thread. Also, i don’t make the rules, i just try to help enforce them. If it were up to me the site would host photos. But tptb don’t want to do that, and i try to respect the rules.