Nevertheless, the hadith is sound through corroborating chains in the wording that reads: “…women who frequently visit graves…,” because it is supported by other reports. As for the clause about “lamps,” I have found no supporting evidence for it, so it remains weak.
He also writes: “The same ruling applies in the Hanbali school if the place contains three graves or more. Where it contains only one or two graves, the prayer performed there is valid, though disliked if the worshipper faces the grave; otherwise there is no dislike.”
I say: This is the opinion of some Hanbali scholars, but Shaykh al-Islam Ibn Taymiyyah did not accept it. He rejected it and reported from the majority of Ahmad’s followers that there is no distinction between a cemetery containing one grave and one containing many. He said in al-Ikhtiyārāt al-ʿIlmiyyah:
“Prayer is not valid in a cemetery, nor facing it. The prohibition exists only to block the means that lead to shirk. Some of our scholars have said that one or two graves do not bar prayer because the term ‘cemetery’ does not apply; by their definition, a cemetery is three graves or more. Yet nothing in the words of Ahmad or most of his companions indicates such a distinction. Rather, the general tenor of their statements, their reasoning, and their proofs all require that prayer be forbidden beside even a single grave—and that is the correct view. A cemetery is any place in which someone has been buried; the word is not merely the plural of ‘grave’. Our scholars have likewise said that everything included under the name ‘cemetery,’ even the ground around the graves, is not a place for prayer. This makes it clear that the prohibition encompasses the sanctity of an individual grave and the adjoining space.
Al-Āmidī and others stated that it is not permissible to pray in a mosque whose qiblah faces a grave unless another barrier is placed between the mosque wall and the cemetery, and some of them said: this is Ahmad’s explicit ruling.”
I say: Shaykh al-Islam also notes in al-Fatāwā and elsewhere that the scholars unanimously deem it reprehensible to pray in mosques built over graves, and he reports that according to Ahmad that prayer is invalid outright. This ruling is drawn from the hadiths forbidding turning graves into mosques and building structures upon them. It is an important issue that most jurists have overlooked, and for that reason I wished to draw attention to it and not leave this