Today the ruins have been well restored; they are accompanied by an excellent museum of Buddhist sculpture, which you should save to enjoy until last.
Restoration of the ruins has taken place.
I don't know what is true, other than that the door looks can't be explained.