Reply on Original Topic - undefined

Hi,
I don’t know what I did exactly. I was replying a direct message while browsing some topics, and when I wanted to submit the message I had this popup:
image

It’s the first time I’ve seen it, and I’m puzzled with the “undefined”. I guess a more user-friendly message would be better. I don’t know if the undefined is a bug, a deleted topic or something else.

Also, which context this popup appears in exactly? :thinking:

3 Likes

My guess is that the original topic got deleted?

I’m puzzled. I don’t know which topic the undefined part is about, and I believe I started my message on the direct discussion page.

This is confusing. Also, I’ve written many messages on various Discourse forums and I didn’t get this popup once (which adds to the confusion), hence what I’m also asking the exact context it appears in.

As for the message itself, I’d prefer “topic not found” to “undefined”. :slight_smile:

I just ran into the same problem on Meta when I had the composer open in two tabs. Attempting to reply to the topic, the popup from your screenshot was displayed. That popup window is expected to be displayed, but underneath the heading, the original topic’s title should be displayed. It seems that Discourse is not finding the original topic.

When I clicked the Reply on Original Topic option, the following error was displayed:

This seems like a bug. Unless someone knows what is causing the problem, we’ll have to work out the steps to reproduce the issue. I’ll get a chance to do that today.

4 Likes

I can reproduce the issue on https://try.discourse.org/.

Steps to reproduce (tested with the Chrome browser on Linux):

  • browse to a topic and click the reply button to open the composer
  • start creating a reply
  • duplicate the tab
  • click the composer’s reply button from the duplicated tab
7 Likes

Honestly, no idea how the ever worked, we still need a massive rewrite on composer model and controller, but at least now stuff is correctly loading and not relying on luck like it used to.

11 Likes

This is still happening. I don’t have steps to reproduce it, but I experienced it today.

OK, but without a repro, what exactly can we do?

So I got a repro by following these steps:

  • browse to a topic and click the reply button to open the composer
  • start creating a reply
  • duplicate the tab (you can do this by right clicking on a tab)
    ---- NEW STEPS
  • click on forum logo
  • click on a other topic
  • composer should show with your previous reply
  • click the composer’s reply button (at this step you should still be on the duplicated tab)

You should see something like this:

10 Likes

This should fix it:

This code is all pretty fragile and very complex to test.

11 Likes