brother Pagluu – The above that you have quoted is correct but it under no circumstances applies to 12er 12th Imam in any stretch of imagination
We have a similar hadith of times to come.
Hudhayfah ibn al-Yaman said, “People used to ask the Prophet, peace be upon him, about good things, but I used to ask him about bad things because I was afraid that they might overtake me.
I said, ‘O Messenger of Allah, we were lost in ignorance (jahiliyyah) and evil, then Allah brought this good (i.e. Islam). Will some evil come after this good thing?’
He said, ‘Yes’
I asked, ‘And will some good come after that evil?’
He said, ‘Yes, but it will be tainted with some evil’
I asked, ‘How will it be tainted?’
He said, 'There will be some people who will lead others on a path different from mine. You will see good and bad in them.”
I asked, ‘Will some evil come after that good?’
He said, ‘Some people will be standing and calling at the gates of Hell; whoever responds to their call, they will throw him into the Fire.’
I said, ‘O Messenger of Allah, describe them for us.’
He said, ‘They will be from our own people, and will speak our language.’
I asked, ‘What do you order me to do if I should live to see that?’
He said, ‘Stick to the main body (jama’ah) of the Muslims and their leader (imam).
I asked, What if there is no main body and no leader?’
He said 'Isolate yourself from all of these sects, even if you have to eat the roots of trees until death overcomes you while you are in that state."
bukhari / volume 4 /book 56 / 803 (General Description of the Fitan (Tribulations))
Please concentrate on later part of the hadith.
When Hudhayfah ibn al-Yaman asked: ‘What do you order me to do if I should live to see that?’
The Prophet (saw) replied: ‘Stick to the main body (jama’ah) of the Muslims and their leader (imam).
Then Hudhayfah ibn al-Yaman asked: What if there is no main body and no leader?’
The Prophet (saw) replied: 'Isolate yourself from all of these sects, even if you have to eat the roots of trees until death overcomes you while you are in that state."
On time of Fitnah and Fasad advised to - 'Stick to the main body (jama’ah) of the Muslims and their leader (imam).
Do you really think the Prophet (saw) by any remote chance was referring to the 12er 12th Imam?
Certainly not! He is referring to the Leader of main Jama’ah of Muslims.
The following question clearly states that time will come when the main body is disunited and in disarray [as it is nowdays] and that there will be no leader/Imam?
*
“What if there is no main body and no leader?” *
In this situation the following was the advice. 'Isolate yourself from all of these sects, even if you have to eat the roots of trees until death overcomes you while you are in that state."
This too can’t refer to the 12er 12th Imam as Shias believe that the 12th Imam is always present.
The Prophet (saw) has acknowledged that time will come when the Muslim Ummah will be devoid of central/Single leadership.
But all this has nothing to do with the topic at hand!!