Unfortunately that is not always how it works out.
In Germany in the 1930s the idea that Jews/non-Arians have conspired against Germany and should be retaliated against was discussed openly - and accepted. Obviously it was not righteous.
In several US states in the 1980s the idea that homo sapiens was created by God and creationism should replace evolution in school textbooks was discussed openly - and accepted. Was it righteous?
These are two very different examples, but both ask the same question: What do we do in the case where truly righteous ideas do not prevail?