
156 P.3d 1268 (2007)
STATE of Kansas, Appellee,
v.
Gary W. HARP, Sr., Appellant.
No. 94,322.
Supreme Court of Kansas.
April 27, 2007.
*1270 Kent A. Roth, of Roth Law Office, of Ellinwood, was on the brief for appellant.
Chris Oakley, county attorney, and Phill Kline, attorney general, was with her on the brief for appellee.
The opinion was delivered by LUCKERT, J.:
Gary W. Harp, Sr., who seeks resentencing pursuant to State v. McAdam, 277 Kan. 136, 83 P.3d 161 (2004), argues for reversal of the Court of Appeals' and district court's determinations that he is not entitled to relief pursuant to a motion to correct an illegal sentence and is not entitled to take an out-of-time appeal pursuant to State v. Ortiz, 230 Kan. 733, 640 P.2d 1255 (1982). We conclude that Harp is not entitled to relief pursuant to a motion to correct an illegal sentence but is entitled to file an appeal out of time.
Harp pled guilty to one count of manufacture of methamphetamine as a severity level 1 drug felony in January 2002. On April 17, 2002, Harp was sentenced to 96 months in prison. He did not file a direct appeal.
In October 2003, Harp filed a pro se K.S.A. 60-1507 motion in which he argued that he should have been convicted of a severity level 2 drug felony instead of a severity level 1 drug felony. This motion was later voluntarily dismissed.
Then, on April 1, 2004, Harp filed another pro se motion-this time a motion to correct an illegal sentence. This motion was filed 3 months after the decision in McAdam. In McAdam, this court held that the offense of manufacturing methamphetamine under K.S.A. 65-4159(a), a severity level 1 drug felony, was identical to the offense of compounding methamphetamine under K.S.A. 65-4161(a), a severity level 3 drug felony. Accordingly, by application of the identical offense sentencing doctrine, the defendant could be sentenced only under the lesser penalty provision. This court vacated McAdam's sentence for violation of K.S.A. 65-4159(a) and remanded for resentencing him to a severity level 3 drug felony for a violation of K.S.A. 65-4161(a).
Harp seeks similar relief. In response to his motion, the State filed a "Motion to Dismiss Defendant's 60-1507 Motion," arguing that, because Harp's April 2004 motion was *1271 filed more than 10 days after the filing of the sentencing journal entry, it should be treated as a K.S.A. 60-1507 motion. The State basically argued that the district court was not obligated to hear a successive motion on the same matter and asked the court to dismiss for lack of jurisdiction.
The district court held a hearing at which Harp was represented by counsel. After listening to the parties' arguments, the court denied Harp's motion to correct an illegal sentence "on the basis that he received a beneficial plea agreement and failed to file a direct appeal and therefore is unable to attack his sentence collaterally."
On direct appeal of the district court's denial of Harp's motion to correct an illegal sentence, the Court of Appeals rejected Harp's contention that the classification of his conviction should be changed from a severity level 1 to a severity level 3 drug felony. State v. Harp, No. 94,322, 124 P.3d 521 unpublished opinion filed December 16, 2005, 2005 WL 3455824 at *2 (Kan.App. 2005). The panel further rejected Harp's argument, raised for the first time on appeal, that the Court of Appeals should consider his appeal as a direct criminal proceeding under Ortiz. Harp, 124 P.3d 521, 2005 WL 3455824 *2.
We granted Harp's petition for review and temporarily remanded the case to the district court for a hearing and determination on the record of whether any of the Ortiz exceptions apply such that Harp should be permitted a direct appeal of his sentence out of time. Ortiz recognized limited exceptions to the general rule requiring a timely appeal from sentencing, concluding that, in the interest of fundamental fairness, an untimely appeal will be allowed only in those cases where an indigent defendant was either: (1) not informed of his or her appellate rights; (2) not furnished with an attorney to perfect an appeal; or (3) furnished with an attorney for that purpose who failed to perfect and complete an appeal. Ortiz, 230 Kan. at 735-36, 640 P.2d 1255 (relying on Brizendine v. State, 210 Kan. 241, 242-44, 499 P.2d 525 [1972]). If any of these narrow exceptional circumstances are met, a court must permit an appeal out of time. See State v. Willingham, 266 Kan. 98, 99-102, 967 P.2d 1079 (1998).
After hearing the evidence and arguments of counsel, the district court found that Harp was not advised of his right to appeal by the sentencing court or by defense counsel. Consequently, the district court determined that, under Ortiz, Harp should be permitted to appeal out of time.
This court retained jurisdiction of the case for consideration upon the district court's final determination. Based upon the arguments and holdings of the lower courts, we must consider whether Harp is entitled to relief via a motion to correct an illegal sentence, a petition pursuant to K.S.A. 60-1507, or through a direct appeal allowed under Ortiz.

Motion to Correct an Illegal Sentence
First, Harp argues that the district court erred in denying his pro se motion to correct an illegal sentence. He contends that, under the identical offense doctrine as applied in McAdam, the district court should have reduced the classification of his conviction for manufacture of methamphetamine from a severity level 1 drug felony to a severity level 3 drug felony.
Generally, no appeal can be taken from a judgment of conviction upon a guilty or no contest plea, "except that jurisdictional or other grounds going to the legality of the proceedings may be raised" as provided by K.S.A. 60-1507. K.S.A.2006 Supp. 22-3602(a). Following a plea, however, a defendant may challenge the sentence imposed under limited circumstances; specifically, he or she may challenge the severity level of the crime upon which the sentence is based. K.S.A. 21-4721(e)(3); State v. Barnes, 278 Kan. 121, 92 P.3d 578 (2004). Additionally, a defendant may argue the sentence qualifies as "illegal" as that term is used in K.S.A. 22-3504. Neither the district court nor an appellate court has jurisdiction over an untimely request to modify a sentence unless the sentence is illegal. State v. Phinney, 280 Kan. 394, 399, 122 P.3d 356 (2005); State v. McCoin, 278 Kan. 465, 468, 101 P.3d 1204 (2004).
*1272 The question of whether a sentence is illegal is a question of law over which this court has unlimited review. State v. Hoge, 283 Kan. 219, 221, 150 P.3d 905 (2007). This court has defined an illegal sentence as a sentence imposed by a court without jurisdiction, a sentence which does not conform to the statutory provision, either in character or the term of the punishment authorized, or a sentence which is ambiguous with regard to the time and manner in which it is to be served. Hoge, 283 Kan. at 225, 150 P.3d 905; State v. Nash, 281 Kan. 600, 601, 133 P.3d 836 (2006); State v. Edwards, 281 Kan. 1334, 1336, 135 P.3d 1251 (2006).
Kansas case law has clearly established that a sentence imposed for a crime which has identical or overlapping elements with a crime of a less severe penalty and, thus, violates this court's rulings on identical or overlapping offenses is not "illegal" as that term is used in K.S.A. 22-3504. The district court had jurisdiction to accept Harp's guilty plea and to impose a sentence under K.S.A. 2001 Supp. 65-4159. See, e.g., State v. Swisher, 281 Kan. 447, 449, 132 P.3d 1274 (2006); Phinney, 280 Kan. at 399, 122 P.3d 356; Barnes, 278 Kan. at 123-24, 92 P.3d 578; see also Hoge, 283 Kan. at 225, 150 P.3d 905 (K.S.A. 22-3504 only applies if sentence is illegal). Harp's sentence conformed to 65-4159 as to its character and term of punishment, and the sentence was not ambiguous. Therefore, relief was not available to Harp under K.S.A. 22-3504.

K.S.A. 60-1507
In the alternative, although not required to do so, the district court could have construed Harp's pro se motion to correct an illegal sentence as a motion challenging his sentence under K.S.A. 60-1507. This construction was recently employed in Swisher, where the defendant raised an identical offense argument in light of State v. Frazier, 30 Kan.App.2d 398, 42 P.3d 188, rev. denied 274 Kan. 1115 (2002) (possession of ephedrine, a severity level 1 drug felony, and possession of drug paraphernalia, a severity level 4 drug felony, had identical elements; thus, person convicted of either one could only be sentenced for severity level 4 drug offense), and State v. Campbell, 279 Kan. 1, 106 P.3d 1129 (2005) (defendant entitled to be sentenced under lesser penalty provisions of drug paraphernalia statute), and challenged his controlling sentence as "illegal" in a pro se motion to correct an illegal sentence. See also, e.g., Love v. State, 280 Kan. 553, 557, 124 P.3d 32 (2005) (pro se motion to correct an illegal sentence treated as motion filed under K.S.A. 60-1507).
However, as this court observed in Swisher, even construing the motion as a K.S.A. 60-1507 motion, the defendant must overcome procedural hurdles. Swisher, 281 Kan. at 449, 132 P.3d 1274. A K.S.A. 60-1507 motion is not typically an acceptable instrument for a nonconstitutional claim of error that the defendant could have addressed on direct appeal. See Supreme Court Rule 183(c)(3) (2006 Kan. Ct. R. Annot. 227); Bruner v. State, 277 Kan. 603, 607, 88 P.3d 214 (2004); see also United States v. Batchelder, 442 U.S. 114, 125, 99 S.Ct. 2198, 60 L.Ed.2d 755 (1979) (no constitutional right to lesser penalty when two applicable statutes proscribe identical conduct).
Moreover, as the Court of Appeals panel concluded, Harp's collateral attack argument must be rejected under the holding in Bryant v. State, 280 Kan. 2, 118 P.3d 685 (2005). In Bryant, this court held that a defendant who enters a plea and does not file a direct appeal cannot collaterally challenge the sentence imposed on the ground that the offense he or she pled guilty to and a second offense having a lesser penalty have identical elements. Thus, where a K.S.A. 60-1507 motion raises a Frazier or McAdam claim, the appellate courts have jurisdiction over such cases, but the claims will not be successful unless a direct appeal of the sentence was pending at the time Frazier or McAdam was decided. Bryant, 280 Kan. 2, Syl. ¶ 3, 118 P.3d 685; see Phinney, 280 Kan. at 401, 122 P.3d 356.
It is clear that, even if Harp's motion were to be considered a K.S.A. 60-1507 motion, the issue of retroactivity has been disposed of in the McAdam setting by Bryant. Thus, whether addressed in the form of a motion to correct an illegal sentence *1273 or a K.S.A. 60-1507 motion, Harp's collateral challenge to his sentence fails.

Application of Ortiz Exception
Next, Harp argues that, if his collateral attack on his sentence is unsuccessful because he pled guilty and did not prosecute a timely direct appeal of his sentence, his most recent appeal should be considered a direct appeal. Although Harp did not file a notice of appeal challenging his sentence within 10 days of his sentencing, on remand the district court determined Harp was not informed of his right to appeal and, thus, an exception articulated in Ortiz applies to excuse the untimeliness of his direct appeal. The State argues that the appeal should not be allowed because no Ortiz exception properly applies.
The issue of appellate jurisdiction is one of law over which this court has unlimited review. State v. James, 276 Kan. 737, 744, 79 P.3d 169 (2003). The right to appeal is purely statutory, and an appellate court has a duty to question jurisdiction on its own initiative. If the record reveals that jurisdiction does not exist, the appeal must be dismissed. State v. Wendler, 280 Kan. 753, Syl. ¶ 1, 126 P.3d 1124 (2006); State v. Verge, 272 Kan. 501, 521, 34 P.3d 449 (2001).
The facts underlying a district court's Ortiz exception ruling are examined on appeal under a substantial competent evidence standard of review. The ultimate legal determination of whether those facts fit the exception are reviewed under a de novo standard. Phinney, 280 Kan. at 404, 122 P.3d 356.
In Phinney, this court reiterated that no Kansas case law prevents a defendant from claiming an Ortiz exception to appeal his or her sentence out of time after benefitting from a favorable plea. 280 Kan. at 402, 122 P.3d 356. In Willingham, 266 Kan. at 99-102, 967 P.2d 1079, we reviewed a claim by the defendant that he should be allowed to file an appeal out of time because the trial court had failed to notify him of his right to appeal under K.S.A. 22-3424(f). This court held there was no evidence the defendant was advised of his right to appeal at sentencing, either by the sentencing judge or trial counsel, and counsel had failed to obtain a written waiver of appeal under Kansas Administrative Regulation (K.A.R.) 105-3-9(a)(3) (duty of counsel to file timely notice of appeal unless obtains waiver of right to appeal signed by defendant). Accordingly, we determined that Ortiz applied, and defendant was allowed to file a direct appeal out of time. 266 Kan. at 100-02, 967 P.2d 1079; see also State v. Redmon, 255 Kan. 220, 222-23, 873 P.2d 1350 (1994) (defendant who entered guilty plea still had the right to appeal his sentence out of time when the circumstances fit an Ortiz exception).
In its appellate brief, the State responds that Harp's case does not fit under the Ortiz exception because he was "aware" of his right to appeal. See Willingham, 266 Kan. 98, Syl. ¶ 2, 967 P.2d 1079 ("Where it can be shown that the defendant was fully aware of his or her right to appeal, or was fully advised of his or her right to appeal by counsel at the time of sentencing, a waiver of that right may be established."). This argument is not persuasive. A transcript of the Ortiz hearing, which we have reviewed, is included in the record on appeal and does not reflect a defendant with a full awareness of his appellate rights.
At that hearing, Harp testified and indicated that, at his 2002 sentencing, defense counsel did not advise him of his right to appeal the sentence within 10 days. Harp further indicated that, had his attorney so advised him and told him the sentence might be shortened under the identical offense doctrine, he would have instructed defense counsel to appeal. Harp denied being informed of his appellate remedies, the steps necessary to implement an appeal, or the possibility of an appeal on the identical offense doctrine. There was no indication that a written waiver of Harp's right to appeal was obtained pursuant to K.A.R. 105-3-9. Harp's testimony indicated that defense counsel did not present such a document to him in 2002.
On cross-examination, Harp basically admitted having a general awareness of the right to appeal. However, he testified that he did not know he could appeal a plea bargain.
*1274 Harp's appellate counsel stipulated at the Ortiz hearing that the sentencing transcript showed "no mention of the right to appeal the sentence within ten days by the sentencing judge." The sentencing transcript, which is also included in the record on appeal, confirms that the sentencing court did not advise Harp of his right to appeal or its attendant procedures and Harp did not have an understanding of his right.
The State contends that under State v. Dugan, 29 Kan.App.2d 71, 25 P.3d 145 (2001), rev. denied 271 Kan. 1039 (2001), abrogated in part on other grounds by State v. Phinney, 280 Kan. 394, 122 P.3d 356 (2005), Harp is precluded from appealing his sentence out of time even if he was not advised of his appellate rights. There, the Court of Appeals held that Ortiz does not supply an appellate court with jurisdiction to entertain an untimely appeal from a presumptive sentence. Dugan is distinguishable from the present case, however, because Dugan did not involve a change in Kansas law or, more specifically, a question of whether the district court sentenced the defendant under the wrong crime severity level. Even if a sentence is presumptive, a defendant may challenge the severity level of the crime. State v. Thomas, No. 95,733, ___ Kan. ___, 156 P.3d 1261, 2007 WL 1238659 this day decided. See K.S.A. 21-4721(e)(3) (in any appeal, appellate court may review a claim that sentencing court erred in ranking the severity level of current crime); Campbell, 279 Kan. 1, Syl. ¶ 5, 106 P.3d 1129 ("Where two criminal offenses have identical elements but are classified differently for purposes of imposing a penalty, a defendant convicted of either crime may be sentenced only under the lesser penalty provision.").
In light of the transcripts from the Ortiz hearing and from Harp's 2002 sentencing, substantial competent evidence supports the district court's conclusion that the facts require an Ortiz exception because Harp was not advised of his right to appeal. Therefore, Harp's direct appeal of his sentence is properly before this court.

Application of McAdam
Having determined that Harp's direct appeal is properly before this court, we must now examine whether the district court should resentence Harp for a severity level 3 drug felony according to the ruling in McAdam, 277 Kan. 136, 83 P.3d 161. The State argues that Harp should not be resentenced because his appeal would not have been pending at the time of McAdam if Harp had taken an appeal within 10 days of his sentence in April 2002.
The same issue was raised in State v. Thomas, No. 95,733, ___ Kan. ___, 156 P.3d 1261, 2007 WL 1238659 this day decided. In that case we hold that when a direct appeal is granted under an Ortiz exception, the appeal is subject to the law in effect at the time of its granting.
Therefore, the holding in McAdam should be applied, entitling Harp to have his sentence vacated. The case is remanded for resentencing as a severity level 3 drug felony consistent with the ruling in McAdam.
The judgment of the district court denying defendant's motion to correct an illegal sentence is affirmed. Judgment of the district court on remand is affirmed. Judgment of the Court of Appeals is reversed. The sentence is vacated and remanded with directions.
JOHNSON, J., not participating.
LOCKETT, J., Retired, assigned.
