Editing post link leaves incorrect gutter link

Steps to reproduce:

Create a post, including a link to post A in Another Topic.

A link to Another Topic will appear in the gutter beside the new post, and a link to Your Post Topic will appear in the gutter beside post A.

Edit the post link to point instead to post B in A Different Topic.

The gutter link changes to show A Different Topic, and a link to Your Post Topic will appear in the gutter beside post B.

Expected behaviour: the gutter link beside post A will be removed.
Actual behaviour: the gutter link remains beside post A, even though the post link no longer exists.

This behaviour occurs whether the link is edited within the “ninja edit” window or not, and irrespective of whether the link is posted using anchor text or a plain link. The “false” link is still present after 24 hours, so is not cleared via sidekiq.

Deleting the link altogether does remove the gutter link; editing it does not.

Seen on v1.6.0.beta1 and tested on v1.6.0.beta2 +102.

6개의 좋아요

Can you repro this with the new state of affairs?

1개의 좋아요

You mean the revamped right gutter? I can’t really test it, unless you want me messing about here on Meta; it doesn’t seem to be on try.discourse yet.

1개의 좋아요

True, it will be on try by Tuesday of next week. Let’s check back then.

2개의 좋아요

Also this was originally tested on my sandbox which is always up to date.

4개의 좋아요

OK - I’ve just tested on Try and the issue exists there, too.

3개의 좋아요

@eviltrout I think we should fix this since it still reproduces.

2개의 좋아요

Here’s a fix for this one. Took longer than I thought because I kept getting confused between what I was linking to and where I was being linked from :confounded:

https://github.com/discourse/discourse/commit/e38f17524b121be0a9482c0c59816afa7263a65f

7개의 좋아요