Kind of similar to this question, but slightly different in some aspects.
In my medieval fantasy Kingdom, the next monarch is usually chosen by direct line of blood with no regard to the successors sex. So basically the oldest child of the dead King becomes the new King or Queen, their spouse the Prince/Princess Consort and their eldest Child the Crown Prince or Princess.
Some examples:
King Reginald had two sons: Hans (the older) and Heinrich (the younger). Hans becomes the new King, with Heinrich remaining a prince for lifetime (and possible replacement if Hans died without heir).
King Reginald dies and King Hans is crowned the new king. He has two Children: Annegret (oldest Daugter) and Arthur (jounger son). Annegret would be next in line but steps down in favour of her more capable younger brother, as she is mentally impaired. She remains a princess, just like her uncle Heinrich, who has thirteen legitimate (and a vast number of illegitimate) children that may not call themself Princes, but are still considered royalty.
King Hans dies and is succeeded by Arthur. Arthur has one illegitimate son, Michael (older half-brother), and one legitimate, Nikolas (younger). Michael is known to have a royal father, though no one knows he is actually the current King's son (and thus a prince). Princess Annegret has two children: Marcus (older son) and Hildegard (younger daughter) - like with prince Heinrich's children, they are considered royalty but lack a title. Some of Prince Heinrich's older children also have children by now.
Now, while King Arthur is still alive, his only true heir, Crown Prince Nikolas, disappears and is declared dead. Who would step up to be the new crown prince or princess?
I'm planning to have that be Michael, his illegitimate older son, who's heritage would be disclosed only at the old King's death. Who would be assumed to be the next heir in the meantime?
The Kingdom's safety much relies on a rightful heir for their protection, as only the TRUE King or Queen can control the Dragon that protects them (or so the lore /religion says, anyways). Given that this makes it very dangerous for the King to lack an official heir - people would be very upset, if not outright terrified, even if the King is still in good health - what can he do in the meantime? Should he disclose the info about Michael being his illegitimate child, and how would that affect Nikolas' status as Crown prince in case of his return?
An illegitimate child would still have the kings 'magical' blood and thus possible control over the Dragon, making them a viable heir, but Michaels mother being a lowly kitchen maid of questionable heritage would cause a big uproar, as the Royal bloodline is expected to be kept clean and only mix with other royals (while still avoiding direct inbreeding as best as possible).
I realize that last point is rather vague and opinion based, so please focus mainly on the question of who would be the 'official' most likely successor whithout Michael's heritage being disclosed.