8

As several questions have brought up before, a long time ago, when a question was closed as a duplicate, instead of adding the duplicate link into the close banner (the one in blue), the Community user would edit the duplicate link into the actual question. Today, the banner of questions closed this way looks a bit confusing:

enter image description here

This answer to one of the questions bringing this up states that fixing this would be very difficult, since according to that answer the database doesn't reference the duplicate.

I suggested that maybe it would be possible to create a script that would check the revision history for the revision in which the Community user edited in the duplicate link, and from that link add the duplicate's ID to the database. The moderator who posted the answer suggested that I write the script, so as a first step in doing that I started writing a query in the data explorer that would find duplicates that didn't have a duplicate link in the database.

When I tried to do this, I noticed that despite what the answer says, the database does actually reference the duplicate. For example, this question has the problem in question, which is that there is no duplicate link in the blue banner, but if you search for it in the data explorer, you will see that the database has a field connecting this post's ID (18584) to the duplicate's post ID (9).

So apparently the references to the duplicates are there in the database, but for some reason the script that renders the blue banner doesn't use them. Could the staff look into exactly why this is, and try to fix it so that the duplicate link is present in the blue banner just like for any duplicate? Fixing it shouldn't be too complicated, I wrote a query in the data explorer that does that, so it should just be a matter of using a similar query in the script that renders the page.

This answer which is yet another of many posts bringing up this issue was marked as by an employee so I don't have much hope in this getting fixed, but I still think that the duplicate link should be added to the blue banner, even if it means that initially the duplicate link would exist both in the blue banner and in the post body.

If you do this, it will be easier to clean these questions up, because then all that needs to be done is that some user >2k reputation edits out the old duplicate link from the body as soon as they see a question like this, whereas if you leave it the way it is the duplicate link will also need to be edited into the blue banner which requires a moderator or a gold tag badge holder to do it.

15
  • 1
    Does this answer your question? Can we bring ancient duplicates up to date? Jun 26, 2020 at 16:00
  • @RobertColumbia No, that's one of the questions I linked to at the beginning of my question to provide context. My question is more specific, asking the staff to look into exactly why this problem exists even though the database references the duplicate. Jun 26, 2020 at 16:03
  • 2
    In some cases, the displayed duplicate doesn't match the one in the database, because the banner was edited. What should be done in those cases? Jun 26, 2020 at 18:12
  • 1
    @SonictheMaskedWerehog We would use the one in the database. Editing out the "possible duplicate" link from the body automatically would be difficult so it would stay there until someone edits it out manually. In the cases where it was edited and the new duplicate is actually better, a moderator or gold tag badge holder could edit the duplicate list manually. Jun 26, 2020 at 19:27
  • @SonictheMaskedWerehog About your edit, I tagged it as [bug] because it's probably still a bug that the duplicate link isn't displayed in the banner, even if fixing that bug would be easier than what was previously thought (which is the main difference between my question and the proposed duplicates). But it might be a feature though, in which case [feature-request] would be appropriate. I guess we won't know for sure until an employee answers and tells us what's going on in the code. Maybe it could be tagged both [bug] and [feature-request] until then. Jun 26, 2020 at 19:37
  • The banner's current style is not a bug. An employee said somewhere (can't find the link) that this current style is intentional. Jun 26, 2020 at 19:38
  • @SonictheMaskedWerehog It would be nice if you could find where they said that so that I can edit my question to include that information. Jun 26, 2020 at 19:41
  • Here it is. See both the "previous bug report" and the "discussed here" links there. Jun 26, 2020 at 20:41
  • Regarding your edit: your proposal of having the link in the blue body regardless of the edit was how they implemented the notice initially, but they later changed it to the current implementation because apparently there were too many edge cases with that approach. Jun 26, 2020 at 21:05
  • @SonictheMaskedWerehog From what I see in the answer you linked the only reason they did that is because having two duplicate links could be confusing. But I don't think that's too big an issue, and eventually if enough of these posts get edited they will no longer have a problem. Jun 26, 2020 at 21:11
  • Shog left a comment on that answer indicating that there are too many edge cases, and Yaakov commented later that taking care of them would be too onerous and not worth the effort. Jun 26, 2020 at 21:15
  • 1
    @SonictheMaskedWerehog From what I've understood Shog's comment is about edge cases causing problems in trying to edit the duplicate notice out automatically. I see no problem in editing them out manually if the duplicate link is added back to the blue banner. Jun 26, 2020 at 21:19
  • 4
    It's by-design/unfixable for questions closed as duplicates before May 20, 2009, since the duplicate target was not recorded in the database prior to that date. After that date, the duplicate target is recorded in the database, but not displayed in the post banner. This could be fixed in an automated way. The text manually inserted into the question should not be automatically removed, because that's far too dangerous. But anyone can edit, so removing these manually is is not a big problem. It's the need to re-open and re-close that is hard, because it requires a mod or a gold badge. Jun 26, 2020 at 23:17
  • For reference on the May 20, 2009, date, and a general history of how the closure system has changed over time, see: meta.stackoverflow.com/a/281664 Jun 26, 2020 at 23:30
  • @CodyGray Or more accurately, as of May 20, 2009, the system began editing in duplicate links upon question closure, but those were still not stored in the database: when the closing system was revamped in February 2013 to the current configuration, there was a backfill run to add those into the database using info from the automatic edits, but that couldn't be run on posts closed before the May 2009 date for obvious reasons. Jun 26, 2020 at 23:54

0

You must log in to answer this question.

Browse other questions tagged .