John 12:16
“But this the disciples knew not, that it was written of Him.”
2. Do you see that they were ignorant on most points, because He did not reveal to them? For when He said, “Destroy this Temple, and in three days I will raise it up”, neither then did the disciples understand. And another Evangelist says, that “the saying was hid from them”, and they knew not that He should rise from the dead. Now this was with reason concealed from them, (wherefore another Evangelist says, that as they heard it from time to time, they grieved and were dejected, and this because they understood not the saying concerning the Resurrection,) it was with reason concealed, as being too high for them: but why was not the matter of the ass revealed to them? Because this was a great thing also. But observe the wisdom of the Evangelist, how he is not ashamed to parade their former ignorance. That it was written they knew, that it was written of Him they knew not. For it would have offended them if He being a King were about to suffer such things, and be so betrayed. Besides, they could not at once have taken in the knowledge of the Kingdom of which He spoke; for another Evangelist says, that they thought the words were spoken of a kingdom of this world.
Source: Homilies on the Gospel of John (New Advent)