OPINION BY
Senior Judge FRIEDMAN.Caine Pelzer, Addam Sloane, et al. (together, Pelzer) appeal, pro se, from the April 8, 2014, order of the Court of Common Pleas of Greene County (trial court) dismissing Pelzer’s complaint against the Pennsylvania Department of Corrections (DOC), Secretary John Wetzel, Superintendent Louis Folino, Deputy Superintendent Lorinda Winfield, Deputy Superintendent Robert Gilmore, Superintendent Brian Coleman, Major Wallace Leggett,-Major John Doe, Captain Durco, Unit Manager Paul Payla, Grievance Coordinator Tracy Shawley, and the SCI-Greene Security Threat Group Management Unit (STGMU) (together, Defendants). We vacate and remand for further proceedings.
On March 5, 2014, Pelzer filed' a class action complaint alleging that Defendants violated the constitutional rights of Pelzer and his fellow inmates in the STGMU by, inter alia, maintaining unlawful prison conditions. On March 31, 2014, Defendants filed preliminary objections to the complaint, asserting that Pelzer failed to state a claim for relief and failed to exhaust his administrative remedies before filing suit. ■ Defendants also filed a motion asking the trial court to decide the preliminary objections without a hearing or oral argument. On April 8, 2014, the trial court entered an order dismissing Pelzer’s complaint without a hearing.1
Pelzer timely appealed to this court. Upon receiving Pelzer’s notice of appeal, the trial court entered an order stating that it “relies on its Order filed April 4, 2014, and no further additions to the record will be filed.” (Trial Ct. Order, 4/17/14.)2
On appeal, Pelzer asserts that the trial court abused its discretion in dismissing his complaint without allowing him to either amend his complaint or file a response to the preliminary objections and without holding a hearing. We agree.3
Pa. R.C.P. No. 1028(c)(1) provides that “[a] party may file an amended pleading as of course within twenty days after service of a copy of preliminary objections.” The trial court, however, dismissed Pelzer’s complaint eight days after Defendants filed their preliminary objections, well before the expiration of the twenty-day period in which Pelzer could file an amended complaint.
Moreover, Defendants’ preliminary objections alleged that Pelzer failed to exhaust his administrative remedies before filing suit. A preliminary objection asserting failure to exhaust administrative reme*144dies “cannot be determined from facts of record.” Note to Pa. R.C.P. No. 1028(c)(2). Under Pa. R.C.P. No. 1028(c)(2), if a preliminary objection raises an issue of fact, “the [trial] court shall consider evidence by depositions or otherwise” before ruling on the objection. See also Schmitt v. Seaspray-Sharkline, Inc., 366 Pa.Super. 528, 531 A.2d 801, 803 (1987) (stating that the trial court must resolve a disputed factual issue raised by a preliminary objection “through interrogatories, depositions, or an evidentiary hearing”). Thus, if a trial court fails to take evidence on a factual issue raised by preliminary objections, an appellate court may vacate the trial court’s order and remand for further proceedings. See, e.g., Schmitt, 531 A.2d at 804; Delaware Valley Underwriting Agency, Inc. v. Williams & Sapp, Inc., 359 Pa.Super. 368, 518 A.2d 1280, 1283-84 (1986).
Here, Pelzer’s complaint alleged that he complied with DOC’s internal grievance procedures before filing suit. Thus, Defendants’ preliminary objections raised an issue of fact regarding whether Pelzer properly exhausted his administrative remedies. The trial court not only failed to receive evidence on this issue, it improperly precluded Pelzer from responding to the preliminary objections in any manner.
Accordingly, we vacate the trial court’s April 8, 2014, order, remand this matter to the trial court, and direct the trial court to notify Pelzer that he has 20 days to file either an amended complaint or a response to Defendants’ preliminary objections.4
ORDER
AND NOW, this 6th day of October, 2014, we hereby vacate the April 8, 2014, order of the Court of Common Pleas of Greene County (trial court) and remand this matter to the trial court for further proceedings consistent with the foregoing opinion.
Jurisdiction relinquished.
. The trial court also issued a separate order denying Pelzer’s request for a preliminary injunction; that ruling is not challenged on appeal.
. In this order, the trial court incorrectly stated that its prior order was filed on April 4, when it was actually signed on April 7 and filed on April 8. The trial court also incorrectly stated that Pelzer's appeal was filed in the Superior Court of Pennsylvania rather than this court.
.Our review of a trial court order dismissing a complaint based on preliminary objections is limited to determining whether the trial court committed an error of law or abused its discretion. Kittrell v. Watson, 88 A.3d 1091, 1095 (Pa.Cmwlth.2014).
. The trial court shall hold an evidentiary hearing on any factual issues that arise on remand. Also, if a party appeals any subsequent order issued by the trial court, the trial court shall prepare a Pa.R.A.P. 1925(a) opinion in support of its ruling.