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 Likes

Can you repro this with the new state of affairs?

1 Like

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 Like

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

2 Likes

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

4 Likes

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

3 Likes

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

2 Likes

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 Likes