
475 P.2d 421 (1970)
STATE of Oregon, Respondent,
v.
Larry R. SLOPAK, Appellant.
Court of Appeals of Oregon, Department 2.
Argued and Submitted September 28, 1970.
Decided October 15, 1970.
Ken C. Hadley, Deputy Public Defender, Salem, argued the cause for appellant. With him on the brief was Gary D. Babcock, Public Defender, Salem.
Jacob B. Tanzer, Sol. Gen., Salem, argued the cause for respondent. With him on the brief was Lee Johnson, Atty. Gen., Salem.
Before SCHWAB, C.J., and LANGTRY, and BRANCHFIELD, JJ.
SCHWAB, Chief Judge.
Defendant pleaded guilty to a charge of sodomy and was sentenced to 15 years in prison. He assigns as error the trial court's refusal to allow him to withdraw his guilty plea on motion made prior to sentencing.
When the defendant again appeared before the judge on April 11, 1969, the defendant's attorney advised the judge that the defendant did not know that he could receive a life sentence under his plea and that the defendant wanted to change his plea to not guilty.
At the next hearing on April 21, 1969, the trial judge conceded that he advised the defendant that there was a 15-year penalty and that he had not advised the defendant that he faced a possible life sentence. The judge did not allow the defendant to withdraw his guilty plea and sentenced the defendant to 15 years in prison.
On several occasions, the latest being today, see State v. Wickenheiser, Or. App. 475 P.2d 422 (1970), we have pointed out that ORS 138.050 limits the scope of direct appeal from a judgment of conviction based upon a guilty plea to matters pertaining to the sentence. State v. Gardner, Or. App., 475 P.2d 92 (handed down October 2, 1970); State v. Brudos, Or. App., 90 Adv.Sh. 1813, 471 P.2d 861 *422 (1970); State v. Middleton, Or. App., 90 Adv.Sh. 723, 465 P.2d 913 (1970); and State v. Kabachenko, Or. App., 90 Adv.Sh. 653, 465 P.2d 891 (1970). Even if there is any merit to the defendant's contention that the trial court abused his discretion by not permitting him to withdraw his plea, and this seems doubtful in view of the holding in Semmes v. Williard, 247 Or. 583, 431 P.2d 844 (1967), we cannot consider it on direct appeal. In State v. Gidley, 231 Or. 89, 93, 371 P.2d 992, 993 (1962), the court said:
"The only other contention of the defendant that needs to be mentioned is that the court erred in denying his motion to withdraw his plea of guilty. The state concedes that this question is properly before the court, though in view of State v. Jairl, supra, [229 Or. 533, 368 P.2d 323] we doubt whether the concession is justified * * *."
In the case at hand, the state does not make the concessions it made in State v. Gidley, supra. State v. Jairl, 229 Or. 533, 368 P.2d 323 (1962), was also an appeal from a plea of guilty. The court there said at 229 Or. 541-542, 368 P.2d at 327:
"We therefore construe ORS 138.050 to restrict the right of appeal of a defendant convicted upon a plea of guilty to the grounds specified in that section and no other. Whatever may have been the state of the law at the time ORS 138.050 was enacted, a defendant now has adequate means, provided by the Post-Conviction Hearing Act, by which to assert rights guaranteed by the state and federal constitutions. He is entitled to no more."
In Lay v. Cupp, Or. App., 89 Adv.Sh. 793, 794, 462 P.2d 443 (1969), we said:
"A defendant accused of crime has a constitutional right to be advised before a guilty plea of the basic legal consequences of the plea, including the maximum penalty assessable under the charge. Von Moltke v. Gillies, 332 U.S. 708, 68 S.Ct. 316, 92 L.Ed. 309 (1948); Dixon v. Gladden, 250 Or. 580, 444 P.2d 11 (1968); and Huffman v. Alexander, 197 Or. 283, 251 P.2d 87, 253 P.2d 289 (1953)."
It follows that, if the trial court, by denying defendant's motion to withdraw his plea, committed error, it was constitutional error, and the Post-Conviction Hearing Act provides a remedy.[1]
Affirmed.
NOTES
[1]  We have had cited to us State v. Burnett, 228 Or. 556, 365 P.2d 1060 (1961), as authority for disposing of a contention such as the one in the case at hand on direct appeal. There, as was the case in State v. Gidley, 231 Or. 89, 371 P.2d 992 (1962), the state apparently conceded that the question was properly before the court. In any event, the question is resolved to the contrary by State v. Jairl, 229 Or. 533, 368 P.2d 323 (1962).
