This is an appeal by John Smicklo from a prison sentence imposed by the Court of Common Pleas of Indiana County. We conclude that the judgment of sentence must be affirmed.
John Smicklo was arrested and charged with stealing a lawn tractor valued at over two thousand dollars from the Burrell Township Elementary School on November 18, 1985. He pleaded guilty to theft by unlawful taking1 and receiving stolen property2 as felonies of the third degree. On August 4, 1986, the Honorable W. Parker Ruddock sentenced Smicklo under the Youth Offenders Act (which was subsequently repealed, effective February 9, 1987).3 In accordance with the provisions of the Act, the Judge imposed no minimum term of confinement, and imposed a maximum term of confinement of six years to be served at the State Correctional Institutional at Camp Hill. See Pa. StatAnn. tit. 61 §§ 484, 485. Smicklo filed a motion to modify sentence which was denied. He appealed to this court, and the case was certified for en banc review.
Appellant contends that the trial judge did not have authority to sentence him under the Youth Offenders Act because the Act was invalid as a sentencing statute. He claims that the Youth Offenders Act, which prohibits a minimum sentence, is inconsistent with the 1982 Sentencing Guidelines, which specify suggested ranges of minimum sentences.4 We recently rejected this argument in Com *452 monwealth v. Smith, 375 Pa.Super. 419, 544 A.2d 991 (1988) (en banc). As we noted in Smith, “A judge could fulfill his responsibilities under both the guidelines and the Act by: 1) considering the minimum sentence range suggested by the guidelines; 2) stating on the record his reasons for deviating from the guidelines and applying the Act; and 3) imposing a sentence without a minimum term of confinement.” Id., 375 Pa.Super. at 430, 544 A.2d at 997. Therefore, the Act and the guidelines are not in conflict. Since appellant qualified for sentencing under the Act and was sentenced before the repeal of the Act, the trial judge had authority to invoke the Act and impose a sentence with no minimum limit.
Appellant also maintains that the trial court erred by failing to state on the record his reasons for not sentencing under the guidelines.5 We must determine at the outset *453whether this issue implicates a discretionary aspect of the sentence or the legality of the sentence. A challenge to the legality of a sentence may be appealed as of right and cannot be waived. On the other hand, we cannot reach the merits of a discretionary sentencing issue unless we find: 1) that the issue was properly preserved in the trial court; 2) that the appellant has filed a brief with this court which does not contain a fatal defect; and 3) that the issue presents the appearance of a substantial question that the sentence appealed from is not appropriate under the Sentencing Code. Smith, 375 Pa.Super. at 435, 544 A.2d at 998; see Commonwealth v. Tuladziecki, 513 Pa. 508, 522 A.2d 17 (1987).
We find that appellant Smicklo’s second claim involves a discretionary aspect of sentence rather than a question of sentence legality. “A legality issue is essentially a claim that the trial court did not have jurisdiction to impose the sentence that it handed down____ A trial court ordinarily has jurisdiction to impose any sentence which is within the range of punishments which the legislature has authorized for the defendant’s crimes.” Commonwealth v. Smith, 375 Pa.Super. at 426, 544 A.2d at 994. As we have noted, appellant’s sentence of no minimum term and six years maximum term was specifically authorized by the Youth Offenders Act, and the Act was in force at the time of appellant’s sentencing hearing. We therefore conclude that the judgment of sentence was not illegal.
By characterizing appellant’s second claim as “discretionary”, we do not mean to imply that the trial court need not explain its reasons for departing from the guidelines. The *454trial court has been directed by the legislature to state on the record its reasons for deviating from the guidelines, and the trial court’s failure to provide such a statement is cause for vacating and remanding a judgment of sentence. 42 Pa.Cons.Stat.Ann. § 9721(b) (Purdon 1982).6 However, it does not follow that the failure to state reasons for sentencing outside the guidelines implicates the court’s power to impose a legislatively mandated sentence. It must bé emphasized that not every error committed during the course of the sentencing hearing is sufficient to divest the trial court of jurisdiction. See, Commonwealth v. Krum, 367 Pa.Super. 511, 513-14, 533 A.2d 134, 135 (1987) (en banc) (consideration of impermissible factor does not render sentence illegal). See generally Commonwealth v. Hartz, 367 Pa.Super. 267 at 285-89, 532 A.2d 1139 at 1148-1149 (1987) (Cirillo, P.J., concurring) (collecting cases on waiver).
In Commonwealth v. Tolassi, 303 Pa.Super. 177, 449 A.2d 636 (1982), we considered the analogous question of whether the trial court’s failure to give an overall statement of reasons for the sentence imposed, as required by the Pennsylvania Supreme Court’s decision in Commonwealth v. Riggins, 474 Pa. 115, 377 A.2d 140 (1977), resulted in an illegal sentence.7 This court held in an opinion by former President Judge Spaeth that:
The requirements that the lower court must state of record its reasons for not ordering a pre-sentence report, Pa.R.Crim.P. 1403(A)(2); that sentences must not be uni*455form but individualized, Commonwealth v. Martin, [466 Pa. 118, 351 A.2d 650 (1976)]; Commonwealth v. Riggins, supra; and that the lower court must state of record its reasons for the sentence, Commonwealth v. Riggins, supra; Pa.R.Crim.P. 1405(b), are all requirements intended to improve the quality of sentencing and to aid appellate review. They do not implicate the power of the court to impose sentence, and the failure to comply with them does not render a sentence “illegal” within the principle that the illegality of a sentence is not subject to waiver, any more that a judge’s failure to make a correct evidentiary ruling makes the resulting verdict “illegal.” Thus we have repeatedly held that the claim that a sentence should be vacated because of the lower court’s failure to state of record its reasons for the sentence will be waived if not made in a motion to modify sentence, filed pursuant to Pa.R.Crim.P. 1410____ Any other result would be inconsistent with the principle of Commonwealth v. Clair, [458 Pa. 418, 326 A.2d 272 (1974) ], that even claims of “fundamental error” may be waived.
303 Pa.Super. at 180-82, 449 A.2d at 638.
Since Tolassi, we have customarily treated claims relating to statement of reasons requirements not as challenges to sentence legality but rather as challenges to discretionary aspects of a sentence. We have reaffirmed the holding that such claims are waived unless raised before the trial court in a motion to modify sentence. See, e.g., Commonwealth v. Martin, 328 Pa.Super. 498, 477 A.2d 555 (1984) (en banc); Commonwealth v. Warden, 335 Pa.Super. 315, 484 A.2d 151 (1984). We have also found that such claims are not appealable as of right, and are subject to the Pennsylvania Supreme Court’s decision in Commonwealth v. Tuladziecki, supra. See, e.g., Commonwealth v. Johnson, 373 Pa.Super. 312, 328-330, 541 A.2d 332, 340 (1988); Commonwealth v. Sanchez, 372 Pa.Super. 369, 539 A.2d 840 (1988) (en banc); Commonwealth v. Thomas, 370 Pa. Super. 544, 537 A.2d 9, 12 (1988); Commonwealth v. Losch, 369 Pa.Super. 192, 535 A.2d 115 (1987); Commonwealth v. Osborn, 364 Pa.Super. 505, 528 A.2d 623, 630 (1987); Com *456 monwealth v. Thomas, 363 Pa.Super. 348, 354-55, 526 A.2d 380, 383 (1987).
In Tuladziecki, the Court emphasized the importance of compliance with Pennsylvania Rule of Appellate Procedure 2119(f). Rule 2119(f) directs the appellant to “set forth in his brief a concise statement of the reasons relied upon for allowance of appeal with respect to the discretionary aspects of sentence.” Appellant’s brief does not contain a Rule 2119(f) statement. This court will overlook a Rule 2119(f) violation where the appellee has failed to object to the defect. Commonwealth v. Krum, supra. In this case, however, the Commonwealth specifically objected to the defect. Supplemental Brief of Appellee at 3-4. Therefore we will not consider whether the trial court provided a sufficient statement of reasons for sentencing appellant outside the guidelines.
Judgment of sentence affirmed.
KELLY, J., files a concurring and dissenting opinion.