Note: I'm using this question as an example, it's possible that the problem doesn't exist in that specific question.

Say someone asks a question. How do I find the value of this <input> with regex in PHP?.

Normally, I would like to close it as a duplicate of How do you parse and process HTML/XML in PHP?, the canonical question with great, informative answers. However, for some reason, I can't find that question in the dialog:

  • It's name changed recently (it used to be called How to Parse and Process HTML/XML in PHP?)
  • The duplicate search is filled with crap - Since this question was asked so many times, lots of questions clutter the duplicate list, and I can't find it.

But I did notice that most questions are duplicates of the canonical, How do you parse and process HTML/XML in PHP? question.

Now let's see my possible workflows in the case I can't find the question in the list, but I have found another question which is duplicated by it:

The Google:

  1. Search the question on Google (remember its name changed recently): "How to parse and process HTML in PHP"
  2. None of the first few results are immediately obvious (because again, the title was changed).
  3. So I pop a few open, and find it.
  4. Copy the address, back to the other tab and paste it in.
  5. Close as duplicate.

Total time? About 50 seconds. Unrealistic for a question that gets asked so many times a day. I'd like to keep my sanity intact, thank you.

Copying the original from the duplicate

  1. Go to the original I did found, which is a duplicate of said question.
  2. Figure out if it's the real question (because again, the name changed).
  3. After confirming it's the question I intend, copy the address, either from the open tab I used to confirm the question, or from the link in the duplicate I chose.
  4. Paste the link to the dialog.
  5. Vote to close.

Total time? About 30 seconds. Better, but still rather annoying (very rather annoying).

What do I propose?

I propose that links to other questions be linked inside of the duplicate dialog. Meaning, that if I hit the link to the original from the original/duplicate I initially selected, I'll be redirected to that question inside that dialog.

It's not too much of a stretch to imagine that a question linked inside the question might be another (better) duplicate.

So our new workflow is:

  1. Find an original from the list, it's not the one I wanted but it's a duplicate of the canonical I wanted.
  2. Click the link in "This question has an answer here: How do you parse and process HTML/XML in PHP?"
  3. Question is already loaded, vote to close.

Total time? Not sure, haven't measured it. I can argue I can complete that in less than 10 seconds.

Can we? Pretty please?


I would propose an improvement in how duplicates are scored within the dialog by using "canonical scoring". Here's how it works.

When the list is populated with similar questions and many of them are closed as a duplicate of a common resource (the canonical question), automatically add that in the list as well and rank it based on frequency.

Doing so might also avoid the chained duplicates path that I see so often.

| improve this answer | |
  • That's another feature request, I felt that at least for now, a simpler solution is needed, and since some links are already opening inside the dialog, that change seems relatively trivial, and extremely helpful. – Madara's Ghost Jun 13 '13 at 4:21
  • 3
    If we're going down that path, a better proposition is that a duplicate of a duplicate should resolve to the original canonical automatically (B is duplicate of A, if I close C as a duplicate of B, it'll be automatically also closed as a duplicate of A). – Madara's Ghost Jun 13 '13 at 4:22
  • @MadaraUchiha That's one step further, but my suggestion would cater for it either way :) – Jack Jun 14 '13 at 4:31

Another possible (but slightly more ambitious) suggestion, would be that duplicates would automatically resolve duplicate chains; consider the following:

  • Given a canonical question A, the user Bob asked question B.
  • Question B gets closed as a duplicate of question A.
  • The user Jane asks question C.
  • Question C gets 5 close votes as a duplicate of question B.
  • Question C is now closed as a duplicate of both question A and question B (in that order)

But I believe the original feature-request is less dramatic and easier to implement. This is a better solution for the long run.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .