51

Let's say that you have a question A that's closed as a duplicate of B. The questions are not identical, but it's easy to see that all the answers of B are applicable to A and solves the problem in a good way.

But if I have an answer to A that's NOT suitable for B, then what should I do?

Here is an example to illustrate. Maybe not the best example, but here goes.

A:

I'm trying to <bla> but when I use function foo I get the error <error>

B:

How do I properly use function foo?

And now I want to post this answer to A:

The function foo is not a good function to <bla>. It works, but it's much better to use function bar

In the above example, I guess that it would make sense to reopen the question. But I have seen examples where it does not seem like a good option. I'll update this question if I find a good example.

12
  • 5
    I must admit, I find this a little difficult to visualise. However, I would not be surprised if there is another dupe target that you could use and post your answer there. Don't forget, a question can be a dupe of multiple questions, not just 1.
    – Thom A
    Jul 6, 2021 at 10:34
  • 18
    "Another common case that shares the same root cause is <insert brief description here>. This can be solved by <insert answer here>." Jul 6, 2021 at 10:40
  • If the question is already closed as dupe, then no can do. We can't answer closed questions. You shouldn't re-open it just to place an answer there, if it is truly a duplicate. Maybe you could post a self-answered Q&A separately instead?
    – Lundin
    Jul 6, 2021 at 12:57
  • 5
    Also I think posting the specific example here would be helpful. Generally, closed questions aren't valuable and need not be salvaged. If they are valuable, they should perhaps not have been closed in the first case.
    – Lundin
    Jul 6, 2021 at 12:58
  • @Lundin That actually sounds like a good solution. Maybe you should post it as an answer?
    – klutt
    Jul 6, 2021 at 13:04
  • 9
    @Lundin I don't see how that's true for duplicates. They're useful even if they're closed. In fact, they're useful because they're closed, and point to the target.
    – cigien
    Jul 6, 2021 at 13:16
  • 2
    @cigien Nope, they aren't considered valuable unless they are up-voted or have an accepted or up-voted answer. They'll get roomba'd and deleted otherwise. I don't remember the exact rules for it.
    – Lundin
    Jul 6, 2021 at 13:41
  • 1
    Correct, @Lundin . The full rules when when/if it's deleted are here. It's also why I explicitly mentioned upvoting the [closed] question if applicable in my answer, as then it won't be (is less likely to be) cleaned up by the roomba.
    – Thom A
    Jul 6, 2021 at 13:44
  • 3
    @Lundin Well, sure, deleted questions aren't useful, whether they're duplicates or not. I was referring to duplicates that are not deleted. I thought that would have been clear, but I guess I should have been explicit about it. To be clear, I'm responding to "If they are valuable, they should perhaps not have been closed in the first case.", which I disagree with. There's value in (non-deleted) duplicates that are closed.
    – cigien
    Jul 6, 2021 at 13:49
  • It's important for the sake of constructive discussion that both questions are clear, specific and unambiguous. Any of those don't apply, then you are going to have big disagreements since every user would interpret a different question. But the rule of thumb is that questions are duplicate if all answers to A apply to B and viceversa, because they are asking the same thing.
    – Braiam
    Jul 6, 2021 at 17:30
  • '-1' from me on the Qt for A/B / foo/bar / <bla>/<blo> / Fake_Example_1/Fake_Example_2 / etc..., while this Qt sounds clearly related to a specific Case/Qt, not linked to... (Or mention that you didn't want to link to it to avoid the Meta-Effect perhaps, I don't know, but I don't like "Fake" Examples in general...)
    – chivracq
    Jul 7, 2021 at 0:30
  • @Lundin "Maybe you could post a self-answered Q&A separately instead?" Definitely, not. No offense, but some users/mods tend to smell blood when they detect the faintest little hint of a question being a dupe.
    – user56983
    Jul 26, 2021 at 22:32

6 Answers 6

11

Do not post an answer, as you do not have an applicable question to which your answer applies. Answers should answer the question asked at the top of the page, not a different one.

Also, do not edit the duplicate to ask something else, as that is OP's prerogative (and often they're better asking a separate question).

However, if you can ask a variation of question A (and/or if OP of the duplicate is not responsive to clarification comments of yours) that is not a duplicate, and that your answer addresses, you can post that as a separate, self-answered Q&A, and reference the original question(s) as the inspiration for it.

11
  • 1
    Hum..., sounds a bit cumbersome to me... What about, @OP (from this Qt) posts a Comment..., flags his own Comment asking a Super-Mod to reopen the Qt to have the Opportunity to post their Answer, and the Super-Mod can close the Qt again...? (Should be OK, I would think, when the Comment and that "Request" come from a User with 25k-Rep, probably Gold-Badge in the Tag...)
    – chivracq
    Jul 7, 2021 at 3:17
  • 12
    We don't have "Super-Mods" here, and you should not use flags (certainly not flags on comments) to request that a question be reopened. @chivracq Jul 7, 2021 at 3:41
  • 6
    "if you can ask a variation of question A that is not a duplicate" try to convince anyone from not closing the question. As soon as someone posts an answer that is on the other questions, they will use that as evidence that they are duplicates. This mess can be entirely avoided if we don't use answers as the only signal for duplicates.
    – Braiam
    Jul 7, 2021 at 4:25
  • @Braiam That's... why I said both "is not a duplicate" and "that your answer addresses". Implicit in the "is not a duplicate" phrase is the suggestion that OP craft the question so that it is, well, not a duplicate.
    – TylerH
    Jul 7, 2021 at 14:38
  • 1
    @chivracq It probably sounds cumbersome because it is a cumbersome act: wanting to post an answer where there is no appropriate question available to receive it. The normal procedure there is... ask the question yourself if you think the answer is useful to others. Sharing knowledge is great and exactly why we're here, but it still has to be done in the right format (for example, we also don't allow people to post blog posts or 'how to's as questions... because that's what answers are for.
    – TylerH
    Jul 7, 2021 at 14:43
  • 1
    @TylerH we had this discussion before. As long as people use answers instead of questions as the basis to take closure as duplicate decisions, we will have these absurd results where questions that are not dupiicates are closed as one due having 1 answer shared between the two questions. Edit your answer to say the same thing as user000001 since you argue that they are functionally the same thing, and you will notice the score plummet.
    – Braiam
    Jul 8, 2021 at 11:19
  • @Braiam You continuing to miss or ignore half my answer doesn't make it the same as a different answer by someone else. I also have not made any reference to how duplicate questions should be considered duplicates vis-a-vis answers one way or the other, so I'm not entirely convinced you've actually read my answer.
    – TylerH
    Jul 8, 2021 at 13:25
  • 1
    No, I do not ignore half of your answer: I'm telling you that you aren't consistent and ignore the reality of the situation: people close questions based only on answers, not on the questions. Until you address this issue, I will continuing pointing it out. Address this, and you will see how I just shut up.
    – Braiam
    Jul 8, 2021 at 14:25
  • You're free to perceive what you want, but that doesn't mean I have to agree with your perception. That aside, as I mentioned already, what criteria people use to close questions as duplicates is totally irrelevant to both my answer and to the question being posed above by klutt.
    – TylerH
    Jul 8, 2021 at 14:36
  • "what criteria people use to close questions as duplicates is totally irrelevant to both my answer and to the question being posed above by klutt" duplicate closure doesn't exist in the vacuum so of course it is relevant.
    – Braiam
    Jul 8, 2021 at 20:24
  • See that's what the OP said was that the answer answered B, but not A, and B had been flagged as a duplicate of A, because the answers of A answered B. And so he's asked a question about some nuance in the policy about what gets flagged as a duplicate and what doesn't. Asking a question that answers B without being a duplicate of A doesn't solve the original problem that there was a question that can't be answered, because it was flagged as a duplicate, because then in turn the question that you ask that answers B is then, by definition, a duplicate of B.
    – user56983
    Jul 26, 2021 at 22:36
6

If all the answers, or vast majority of them, in the duplicate candidate answer the closed question then, firstly, leaving the question closed as a duplicate is the correct thing to do. The fact that there are other possible answers, that aren't applicable to the other question but are to the one being closed, shouldn't weigh on that. If the [closed] question that has been asked is good you should also upvote it, and it can work as a "sign post" when someone else in the future has the same question as the closed question, and not the dupe's. This means that future users can benefit from both questions. This also helps Stack Overflow fulfil its goal of becoming a large and complete knowledge base.

One option that comes to mind, however, is to post a new question with your answer (that isn't an answer the the duplicate candidate), but ensure that the question you are asking cannot be answered by those in the duplicate candidate. So none of the answers on Question A answer the question you are posting. Then add your answer to your own question. If you feel like it, you could also make the answer a community answer, to demonstrate that you aren't trying to "game" reputation. Finally, suggest your new question as a duplicate candidate of the closed question. You will, however, need to wait for the your answer you have posted to receive at least 1 upvote before you can suggest your new question as a dupe candidate.

Otherwise you have the method Cody Gray♦ suggested. I'm just going to quote them here:

"Another common case that shares the same root cause is <insert brief description here>. This can be solved by <insert answer here>."

So what Cody is saying here is you post a new answer, on the dupe target, and explain a scenario that someone might find themselves in (the one in the closed as dupe question) and in that case you could also use solution X. Then you answer the other scenario, that although doesn't technically address the question being asked, does address a very related scenario which people might encounter when dealing with a very similar problem; the problem on the closed question.

4
  • 6
    Admittedly, it feels weird for me to be the one posting terse statements and not lengthy answers for a change. Jul 6, 2021 at 14:07
  • 6
    I disagree with posting an answer under a question that the answer doesn't address. That goes against the grain of how Q&A scoping should work. Maybe in the one exception that it's answering another popular question closed as a dupe of the Q you are answering, but even then it still feels... wrong.
    – TylerH
    Jul 7, 2021 at 1:28
  • 2
    Why the entire discussion about Cody's poor argument was deleted?
    – Braiam
    Jul 7, 2021 at 4:23
  • Again, you cannot post a Q&A that answers B, because then that Q&A would, in fact, under current policy, be a duplicate of B, even if B had been had been flagged as a duplicate of A.
    – user56983
    Jul 26, 2021 at 22:40
1

In my opinion, two questions A and B are truly duplicates iff both the following criteria are fulfilled:

  • All potential answers of A are good and complete answers to B
  • All potential answers of B are good and complete answers to A

In the case you mentioned this wouldn't be true, so I would reopen question A and answer it. It would also be probably useful to add a comment under question A that links to B, since they are related.

If you can't (or don't want to) reopen it by yourself, then at least add a comment to question A that shows the proper way to do it. If you have a gold badge, then answering in a full answer instead of a comment is almost always preferred, but sometimes it's hard to get the needed reopen votes, so don't leave the question unanswered.

21
  • 3
    I don't really agree that reopening is the right choice here. You might then be able to add 1 answer which is for a specific scenario which isn't covered in the other question, but you then deprive the user, and future readers, of all the answers on the duplicate candidate. This means they end up with one answer, the alternative.
    – Thom A
    Jul 6, 2021 at 12:55
  • 9
    @Larnu Yeah, but It should never have been closed. That is the root of this problem: Way to many wrong dupe closes.
    – MegaIng
    Jul 6, 2021 at 12:58
  • 6
    I think I've seen a wrong dupe closure once. Maybe even twice. Hardly evidence of there being "way too many". And, fortunately, there's an easy way to correct any mistakes that might be made! Jul 6, 2021 at 12:59
  • 4
    @Larnu thankfully Google usually gives you more than one link. But seriously, I've resorted to leaving a comment instead of an answer many times. The worst is when the asker deletes the question in disgust and you can't even leave a comment. Jul 6, 2021 at 13:00
  • 3
    "but It should never have been closed." I disagree; if the question is answered in another question, it's very likely a dupe candidate. The fact that all the answers in the other question answer the question [being closed] means that the closure reason was correct.
    – Thom A
    Jul 6, 2021 at 13:02
  • 5
    "thankfully Google usually gives you more than one link." unfortunately, some (many [un-cited]) users don't know what Google, or a Search Engine is, @MarkRansom . :( I have often closed questions by literally pasting the question title into Google and gold badging the question with a link to the first [Stack Overflow] result.
    – Thom A
    Jul 6, 2021 at 13:03
  • 3
    @MegaIng If the question never should have been closed, then the correct thing to do is to reopen.
    – klutt
    Jul 6, 2021 at 13:05
  • 8
    Come on @CodyGray, you can't really believe that only a couple of SO questions have been closed as dupes incorrectly. I assert that a query showing the number of dupes that have later been reopened would return at least in the tens of thousands of results.
    – user000001
    Jul 6, 2021 at 13:06
  • 2
    "I assert that a query showing the number of dupes that have later been reopened would return at least in the tens of thousands of results." Possibly, but that could be because the OP has since improved their question to explain why it isn't a duplicate; something that few do. I have certainly single handedly reopened several questions due to improvements to define why the question isn't a dupe; some my own unilateral closers, some other's.
    – Thom A
    Jul 6, 2021 at 13:08
  • 6
    I was talking merely about the ones I've seen, @user000001, not the ones that might hypothetically exist. However, it's worth noting that your query would need to control for questions that had not been edited between closure and re-opening. Once that is done, I suspect you would find that there are many fewer questions there than you imagine. Jul 6, 2021 at 13:10
  • 5
    @user000001 People tend to have very different opinions on when to close as dupe. Some people almost seem to think that different variable names is enough to not close it.
    – klutt
    Jul 6, 2021 at 13:10
  • 2
    This is the answer, since this is what a duplicate means: this question is asking the same thing that this other question.
    – Braiam
    Jul 6, 2021 at 17:46
  • 2
    "duplicate" is not a transitive relationship. A question "A" about the workings of X, the workings of Y, and the difference between them is a thorough answer to a question "B" only about X. There is zero value to keeping question "B" as that ground has already been totally and completely covered. This is not a hypothetical
    – Ben Voigt
    Jul 6, 2021 at 21:03
  • 3
    @Braiam: "I" did nothing of the sort.
    – Ben Voigt
    Jul 7, 2021 at 15:10
  • 2
    Ben Voigt has given a good example which contradicts this answer; but: outside of “canonical” dupes, this is a pretty good rule of thumb, and I wish it were applied more often. Cody’s claim honestly beggars belief: incorrect (and subsequently reopened) dupes aren’t rare at all. On the contrary, they’re unfortunately quite common. Jul 7, 2021 at 15:54
1

The "duplicates" mechanism is far too crude.

In XSLT/XPath-land we have at least 2000 questions saying "I can't understand why my stylesheet produced this output", to which the answer is "The XML source document is in a namespace and you failed to take this into account". But the symptoms are highly variable, and the details of how to fix the problem are also variable. (With XPath, for example, the fix depends on what particular XPath processor you are using.)

What we really need - in order to be able to help both the original poster and other people who come along later - is to mark this saying "this is a common problem, see HERE for a description of the general problem and the general approach to tackling it" without closing the question and thereby preventing answers of the form "In your particular case, you can fix this by changing foo to bar:foo on line 23.", or "In your particular case, the reason why it produced "17" as output is that the template rule on line 22 failed to match the source element, because the source element is in a namespace".

9
  • 2
    What you describe as "what we really need" is precisely what we already have: you close the question as a duplicate of the one that describes the more general/common problem, and you leave a comment pointing out the specific cause in the particular context of the code shown in the question, with whatever details you think are appropriate (line numbers, identifier names, etc.). The fact that the symptoms are highly variable is exactly why the duplicate system exists: to allow redirecting a variety of different-looking questions that nevertheless have a common root cause to a single, canonical. Jul 8, 2021 at 11:37
  • Maybe the real problem is the word "duplicate"?
    – klutt
    Jul 8, 2021 at 11:38
  • @klutt Indeed, the use of the word "duplicate" is unfortunate, because (a) it suggests to the OP that they should have known that someone else had asked the same question (in fact, it's the answer that's a duplicate, not the question), and (b) it suggests to answerers that they should only use the mechanism if the questions are extremely similar. Jul 8, 2021 at 11:43
  • 1
    @CodyGray Part of the problem is that it's hard to identify one place that describes the general problem. Of the 2000 questions with this "root cause", there are probably 500 different answers, none of which is a really good definitive overview of the problem. The current mechanism simply doesn't encourage people to consolidate and cluster information into a single place in that way. (Search for "XPath default namespace" and you'll see what I mean: and that only gives you the questions where the OP knew it was a problem with namespaces, which is a small proportion of them.) Jul 8, 2021 at 11:46
  • 2
    Ah, I see. That may be a case where someone needs to create (either by asking a question de novo or heavily editing an existing, already-popular Q&A) a "canonical" question which can be used as that "single place". This has been done for other languages/technologies, like NullReferenceException in Java and C#. If you search Meta for the keyword "canonical", you'll find lots of prior discussion about it in different contexts. I do agree that perhaps "duplicate" is a less-than-ideal choice of word here, but naming is hard. :-) Jul 8, 2021 at 12:12
  • "The XML source document is in a namespace and you failed to take this into account" This seems like a "how to" question: how to correctly interpret xml data using xslt? (or something similar). It won't be a duplicate target, but at least you can link it via comment/answers to explain how to correctly prevent this issue.
    – Braiam
    Jul 8, 2021 at 12:54
  • BTW, the duplicate mechanism isn't too crude, it's badly used since people think that related means that they are duplicates. Those questions on XSLT are related one another in the broad, but they aren't duplicates.
    – Braiam
    Jul 8, 2021 at 12:55
  • 1
    It's 2000 people who have fallen into the same hole, and are describing the effect of falling into the hole, which is different in each case. Jul 8, 2021 at 14:53
  • 2
    that's a perfect use case for duplicate closure to a generally accepted canonical that describes the problem as a whole and how to resolve it. It won't stop people from asking it, but it gives the community the means to ensure these users are receiving the best answer.
    – Kevin B
    Jul 8, 2021 at 14:55
0

Regardless of what you do, you want to keep a reference to question B, since the Q&A of that question will likely help most readers.

Depending on the case, I would do the following:

First, I would see whether my answer really can't be written in a way so that it's applicable to question B. For example, I could add an answer like this to question B:

Function foo can be used to do <bla>, but it isn't suitable to do <blabla>. In that case, it's better to use function bar.

When doing this, always make sure the answer is applicable to the question.

If I can't write the answer in such a way, I would have to make a judgment call in whether those questions are actual duplicates or just near-duplicates and if my answer would have enough of an impact to differentiate between these questions.

If question A isn't too old, I would first add a comment asking why the OP didn't use bar. If the OP can't (for example because they're restricted to use foo), I would keep question A closed (and perhaps edit it claryfing why the question uses foo and not bar). In that case, if I think my answer is really useful, I would create a separate self-answered Q&A.

If the OP didn't know about bar or the question is really old, I would rephrase the question so that it's less about foo, and more about the actual problem they're trying to solve. I would add a comment explaining why I think question B isn't a proper duplicate, and vote to reopen.

After reopening, I would try to make sure to keep a reference to question B. For example:

The function foo is not a good function to <bla>. It works, but it's much better to use function bar.

However, if you do intend to use function foo, then <link to question B> wll answer your question.

If I don't feel like I should earn reputation for this solution (because question B still covers like most of the cases), I would add this answer as a community answer.

-3

Sometimes when this happens, like in the example, the question needs improvement. OP simply didn't know what the right question should be. If that's the case, you can rephrase the question, open it and answer it. But be very careful when you do this, and it's advisable to ask OP before. Best thing is often to ask OP to rephrase the question themself.

But in the example provided, you could change A to:

I want to <bla>. So far, I have tried with foo, but I did not get it to work. I'm open to other ways of solving it that using foo.

So you're basically changing the question from "How do I <bla> with foo?" to just "How do I <bla>?". But again, I want to emphasize that OP has the intention of solving it with foo for whatever reason.

9
  • Shouldn't the asker have come to this conclusion by themselves, even before you come with a possible answer? Not to say this never happens, but I don't think this is a good answer to your current question. If they accepted the fact their question is closed as a duplicate, it's probably because at the end, "bar" was really better for them.
    – Kaiido
    Jul 6, 2021 at 14:12
  • 2
    This doesn't feel like it's answering the question being asked in your question here. This feels like you're describing that a User asked an XY problem, so the question was closed of a question asking Y, where they actually wanted to ask about X. If that is the case, then then the answers to Y don't apply if the OP actually wanted an answer to X; but the question explicitly states that the answers to Y do apply. If, after asking about Y the OP wants to ask about X, they should be asking a new question about it.
    – Thom A
    Jul 6, 2021 at 17:01
  • If you're changing the question from "How do I <bla> with foo?" to just "How do I <bla>?", change the question from "How do I <bla> with foo?" to just "How do I <bla>?", don't add "best way to do it" into the mix. Then it will get closed as "primarily opinion based" or some sap like me has to come along and edit it so it say "how to" instead of "best way to". Jul 6, 2021 at 17:18
  • 1
    @Kaiido I would agree that that statement if it were not for the case that most users posts one question and then leaves. Just because a user does not object to the closing, that does not mean that they are satisfied. And furthermore, I did not say that the dup did not solve their problems. What I'm talking about is that the user is completely unaware that using foo is a suboptimal method.
    – klutt
    Jul 6, 2021 at 17:23
  • @Larnu I agree in theory, but not in practice.
    – klutt
    Jul 6, 2021 at 17:28
  • 1
    @HereticMonkey IMO, users here are WAY to triggerhappy with "primarily opinion based". There are a lot of questions closed with that reason which are perfectly answerable in an objective way.
    – klutt
    Jul 6, 2021 at 17:30
  • 2
    @klutt Sure, but the close reason is about the question. Is the question primarily seeking opinions? If someone asks me what kind of car they should buy, I can answer them with facts and figures and all kinds of objective measurements. But other people could answer "I buy American" or "My brother owns a Kia dealership; let me give you his number". And that's where the danger lies. We need to close the question so we don't get the crap answers. It's not about can they be objectively answered, it's about whether the question is constructed so that it's harder to answer subjectively. Jul 6, 2021 at 17:49
  • 2
    @HereticMonkey I have edited it now since it doesn't matter in this case. But I still think people are WAY too quick to use that close reason.
    – klutt
    Jul 6, 2021 at 18:40
  • I like this answer because it describes an option to edit the question for make it non-duplicate. The only thing I would add, that before going that way it could be useful to determine, whether a question "I want to <bla>" or "How do I <bla> with foo" will be properly scoped for Stack Overflow. If yes, then I find perfectly acceptable to suggest the OP to rephrase the question, and (vote to) reopen the question after such edit. If no (e.g. the question will be "too broad" after rewording), then I wouldn't even try to reopen such question.
    – Tsyvarev
    Jul 8, 2021 at 10:15

You must log in to answer this question.

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