Discobot image lesson may not be working in some circumstances

The image lesson is the first lesson that asks you to do two things:

  • like the image Discobot sends you
  • reply with an image

If you just reply with an image, Discobot says:

Looks like you didn’t upload an image

even though the image is fine, and it’s just that you need to like the message. Probably it should either not require you to do two things in response to one message, or be clearer that you have to like it, or just actually tell you that you need to like it if you reply without having done so.

(Someone else already reported this here, but apparently it’s not reproducible – initially, I dragged the image Discobot sends you into the reply box; once I failed it once, I copied the link Discobot sends you, and both times I just got “Looks like you didn’t upload an image”, not anything about needing to like the message.)

4 Likes

Can you repro this @jomaxro?

1 Like

Yep, can repro. If you upload an image but don’t like the post, you get the “no image found” error, instead of the expected “why didn’t you like my post?”

5 Likes

Hmm how did this regress @tgxworld, maybe take a look when you are fully back

@jomaxro Can you provide me with the exact steps that you took?

I tested on both try and meta which gave me the correct behavior.

4 Likes

Definitely no repro on try @jomaxro

… if you are somehow getting this to happen, it is subtle. We are gonna need literal click by click and touch by touch instructions.

1 Like

Interesting, my testing was on try too, so :man_shrugging:? I’ll see if I can repro it again, and note the steps more specifically.

Repro’d it again. What I did was dragged and dropped the picture of the unicorn from discobot’s post, which caused the “you didn’t upload a picture” error.

I can confirm that uploading an image from local (I tested via drag and drop) works as expected, and I see the “did you forget to :heart: my post” reply.

2 Likes

This … this … has never been a supported behavior…

You haven’t actually added an image in that case. When we say “drag and drop” we mean drag from the desktop and drop.

Except the error text that you get implies oneboxing will work. (emphasis mine)

True, does that one not work? If so that’s a bigger bug.

It didn’t work after I failed with the unicorn picture. I can try again by pasting that first, before I drag and drop the unicorn. One sec…

Can confirm that pasting the link explicitly mentioned by discobot fails too.

1 Like

OK so looks like that’s the regression @tgxworld – it should detect that as an image.

2 Likes

Ahh I see what the problem is here. When a link to an image is given, it gets converted into a onebox. Any images that are present within a onebox are not counted as an image as far as our post analyzer is concerned. I guess we can be more lax with the rules for discobot such that any image tag in the cooked post is considered to be a valid image?

4 Likes

Sounds good to me, let’s make it so!

Fixed in

https://github.com/discourse/discourse/commit/6fde58ff90bcf1f7274883050af8a3206bf9f7dd

Thank you for reporting @anon80167013 and thanks to @jomaxro for figuring out the reproduction steps :slight_smile:

6 Likes