Of all the Hapsburg and Bourbon kings who ruled Spain , only two are missing ( Felipe V is buried at La Granja de San Ildefonso , Ferdinand VI in Madrid ) .
Madrid was not the intended resting place for Ferdinand VI .