In the opinion, the KSC explained that a defendant can plead guilty or no contest to a DUI charge and still pursue a challenge to the prior convictions at sentencing (and on appeal). But the better practice in order to challenge the classification of the offense as a felony is to do a bench trial on stipulated facts. On this issue, the court explained as follows:
A defendant who intends to challenge the validity of a prior misdemeanor DUI as a classifying factor for a DUI felony charge under K.S.A. 8-1567 should challenge the prior misdemeanor at preliminary hearing, consistent with the holding of Seems, 277 Kan. at 305-06, or through a timely motion to dismiss. See State v. Crank, 262 Kan. 449, 458, 939 P.2d 890 (1997) (challenge to prior conviction relied on by State to increase severity level properly raised at preliminary hearing); State v. Floyd, 218 Kan. 764, 765, 544 P.2d 1380 (1976) (same). If those efforts are unsuccessful, in order to pursue the argument on classification on appeal —i.e., that the defendant could be convicted only of a misdemeanor and not a felony—the defendant generally must go to trial, even if that trial is conducted only to the bench on stipulated facts.The moral of the story - object to prior convictions at the preliminary hearing, or otherwise prior to conviction (e.g., motion to dismiss), do a bench trial on stipulated facts, and then renew any argument at sentencing. You can still plead guilty to the DUI and challenge the priors at sentencing (and argue for a misdemeanor sentence), but you may lose the ability to challenge the "classification" of the offense as a felony.
If the defendant instead enters a guilty or no contest plea and does not file an unsuccessful motion to withdraw it while before the district court, then the jurisdiction of an appellate court will be limited to a review of the sentencing pronounced in the current felony case. Any challenge to inclusion of a prior misdemeanor in the defendant's criminal history for purposes of sentencing enhancement should be preserved for appeal by an objection on the record at sentencing. A successful appellate challenge on that ground will not erase the prior conviction; only a successful motion under K.S.A. 60-1507 can do that. But a successful appellate challenge can lead to vacation of the enhanced felony sentence and resentencing without consideration of the prior, invalid DUI misdemeanor conviction.