The above tradition can also be found in Sahih Muslim...
The above tradition can also be found in Sahih Muslim, Chapter of "Kitabul- Wasiyyah" in section "Babut-Tarkil-Wasiyyah", 1980 Edition, Arabic version (Saudi Arabia), v3, p1259, Tradition (#1637/22). As you see in the above traditions, the Prophet (PBUH&HF) was accused of talking no sense by an opposition group among the companions whose leader was Umar.
In the above tradition, Ibn Abbas mentioned Umar and his company PREVENTED Prophet from writing his will which could prevent people from going astray after him. So the conclusion from the above tradition is that the writing it did NOT take place.
In the following tradition, however, Sa'id Ibn Jubair alleged that the Prophet said three things but he has forgotten the third one which was beneficial for Muslims: Sahih al-Bukhari Hadith: 4.393 Narrated Said bin Jubair: I heard Ibn 'Abbas saying, "Thursday! And you know not what Thursday is? After that Ibn 'Abbas wept till the stones on the ground were soaked with his tears. On that I asked Ibn 'Abbas, "What is (about) Thursday?" He said, "When the condition (i.e.
health) of Allah's Apostle deteriorated, he said, 'Bring me a bone of scapula, so that I may write something for you after which you will never go astray.' The people differed in their opinions although it was improper to differ in front of a prophet, They said, 'What is wrong with him? Do you think he is talking no sense (delirious)? Ask him (to see if he is talking no sense).
The Prophet replied, 'Leave me, for I am in a better state than what you are asking me.' Then the Prophet ordered them to do three things saying: 'Turn out all the pagans from the Arabian Peninsula, show respect to all foreign delegates by giving them gifts as I used to do.' The third order was something beneficial which either Ibn 'Abbas did not mention or he mentioned but I forgot!
Sa'id Ibn Jubair claims that Prophet said three things but he has forgotten the third one which was beneficial for Muslims. It is interesting to see that the narrators who used to memorize thousands of traditions, simply forgot the last will of Prophet (PBUH&HF).
Now if you look at the two things that the sub-narrator allegedly attributed to the Prophet, i.e., Expelling pagans from Arabian Peninsula respecting foreign delegates One can see that these are not the things that if Muslim do, they will NEVER go astray after Prophet.