Commenting on first post in a journal thread creates a new entry instead of a comment

Environment

Discourse Version: 268efcccdd2df66762d116d01ad62e7641a503c6

Plugin Commit: 4b918d7

Steps to Reproduce

  1. Go to existing journal
  2. Click on “Comment” button underneath first post
  3. write a post and submit it

current behaviour: it will be posted as a new entry
expected behaviour: a new comment should be created underneath the first post

Example

https://cablogstaging.discoursehosting.net/t/journal-test-by-alex-android/30475/27?u=jrgong

Logs

log not applying here

1 Like

Hi @jrgong, :wave:
I tried to have a look but I can’t even get past the register/ login modal - the register login is failing and the console is showing a lot of errors. Something is definitely not functioning as it should there. :thinking:

seems to be related to the removeChild method:

      var next = current.nextSibling;
      parent.removeChild(current);
      if (current === last) {
        return next;
      }

Hopefully someone will be able to help you with this shortly.

@richard / Cq can you check?

1 Like

Yeah, registration is disabled because it’s a staging site, I will PM you an invite @Lillinator

@jrgong i am in but that page you linked is not existing or private for me. can you send me a link to a journal topic that I can view so I can test the commenting button functionality? Thank you :slight_smile:

You should have access now, granted you tl4

1 Like

Yes I think I found a Journal entry to test. Thank you.

Sent you a Chat message on our staging site :slight_smile: @Lillinator

@Lillinator

I clarified my bug submission above, see:

1 Like

when i post a comment, it is created underneath. I may be misunderstanding you.

@Lillinator Is that a question or request? Sorry there seems to be some confusion here, maybe you could clarify?

I provided the exact steps to reproduce the bug as well as the expected+actual behavior. Is there anything missing.

@richard maybe you can jump in here? I don’t really know what else I could provide here to explain the bug.



or so you mean you want this?

The problem is that it does not work on the first post of a topic. But AFAIK that is by design.

Commenting on other posts works as intended.

The “only” issue here is that somehow a comment button appears under the first post.

1 Like

@angus can you please answer a quick question, I have been staring at this for over an hour now and I can’t find it.

On 3.0 there is no “comment” button below the start post, on 3.1 there is one. And there shouldn’t be one as far as I have understood.

I would have expected a !attrs.firstPost in the code but it’s not there.

1 Like

It’s because the appearance of that button is determined by the attachCommentToggle attribute which is set in that initializer in the post-stream html override

I’ll try and take a look at this in a bit.

2 Likes

This is resolved.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.