Shaykhul-Islaam Ibn Taymiyyah (may Allah have mercy upon him) said:
It is not for anyone to take a covenant from someone that he agrees to everything that he (the one taking the covenant) wants, have an alliance with those who are in alliance with him and enmity to those who show enmity towards him.
Al-‘Allaamah ash-Shaykh Rabee’ (may Allah preserve him) commented:
It’s possible that the taking of a covenant from a person is not by (actual) speech. How it takes place, is when it is as if the person (taking the covenant) by way of his state (of behavior and stance) says with his tongue, ‘It’s a must that you take my view.’ We free ourselves to Allah every time the person takes our statement with his desires. This is something that Allah is not pleased with. If two people fall into dispute and you aid the one who you see to be upon the truth, even if the truth is with him but you aid him based upon your desires, you’re sinful. That’s because it is obligatory that you do things for the sake of Allah. You do not want anything except for the truth. And you do not support anything except for the truth. Allah states:
يا أيها الذين آمنوا كونوا قوامين بالقسط شهداء لله ولو على أنفسكم أو الوالدين والأقربين
“Oh you who believe, be those who stand up for justice, witnesses for Allah—even if it is against yourselves, your parents or relatives.” (Soorah an-Nisaa: 135)
Therefore, if your father made a mistake in a matter and the one disputing with him is the most corrupt of the people, or he (the disputing party) is a disbeliever and your father is a righteous pious man, but the truth is with the disputing party, it is obligatory that you speak the truth whether it is a matter of religion or worldly affairs. As for the one who follows a person based upon his desires, and he aids him with his hand and tongue without having knowledge that the truth is with him, this is from the (ways) of the people of Jaahiliyyah. This is the case even if the one who he is following is correct. This action of his (i.e. following a person while not knowing if the truth is with him) is not correct. As for the case in which the one who he is following is incorrect then he is sinful.
Therefore, it is obligatory that the person only acts and takes stances upon the truth for Allah. It’s obligatory that he searches for the truth and follows its people. It’s obligatory that he aids this truth and its people. This is what is required from the believer. I hope that there is no one from amongst us that follows his desires and aids falsehood. As for the one who has some weakness with him (in this matter), it is upon him to fear Allah regarding himself and to turn to Allah in repentance.