
120 Ill. App.3d 364 (1983)
458 N.E.2d 11
THE CITY OF CHICAGO, Plaintiff-Appellee,
v.
COSMOPOLITAN NATIONAL BANK et al., Defendants-Appellees  (Arnie Yusim Chevrolet, Inc., Petitioner-Appellee,
v.
Louis N. Epstein, Intervenor-Appellant).
No. 83-0421.
Illinois Appellate Court  First District (1st Division).
Opinion filed November 28, 1983.
Rehearing denied January 9, 1984.
*365 Mark B. Epstein, of Chicago, for appellant.
Elizabeth C. McGinnity and Stuart Finkle, both of Chicago, for appellee Arnie Yusim Chevrolet, Inc.
James D. Montgomery, Acting Corporation Counsel, of Chicago (Jerome A. Siegan and Robert J. Dargis, Assistant Corporation Counsel, of counsel), for appellee City of Chicago.
Judgment affirmed.
JUSTICE GOLDBERG delivered the opinion of the court:
This appeal involves a sheriff's sale of a vacant piece of real estate. The successful bidder was Louis N. Epstein (plaintiff). The city of Chicago had filed a complaint to foreclose the city's lien for the cost of demolition of the building upon the property. Plaintiff sought appropriate relief including mandamus to require the sheriff of Cook County to issue a deed.
The pertinent facts are best stated in chronological order:
June 9, 1976 - The city demolished the building and then recorded its lien for $6,219 for expense and cost thereof.
April 8, 1977 - Arnie Yusim Chevrolet, Inc. (Yusim) purchased the property by warranty deed from the record owner.
April 20, 1977 - Yusim recorded its deed to the property.
July 2, 1979 - The city filed a complaint to foreclose its lien. This was more than three years after recordation of the city's lien. Yusim was not a party to the city's complaint.
July 3, 1979 - The city recorded a lis pendens concerning the action.
April 29, 1981 - Judgment for foreclosure was entered upon the city's complaint.
June 3, 1981 - The sheriff's sale was conducted. Plaintiff was the highest bidder. In due course plaintiff paid his bid in cash and received *366 a certificate of sale.
July 8, 1981 - The sheriff's report of sale and distribution of the proceeds of sale was confirmed.
November 18, 1981 - Yusim filed a petition for relief under the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 2-1401). Yusim alleged that the judgment was void because the attempted foreclosure by the city was filed too late.
December 4, 1981 - Plaintiff presented his certificate of sale to the sheriff and demanded a deed. The sheriff refused to issue the deed because of the pendency of the proceedings commenced by Yusim.
December 6, 1981 - Plaintiff again demanded issuance of the deed and the sheriff refused.
December 30, 1981 - Plaintiff was given leave to intervene, to file his motion to dismiss the petition previously filed by Yusim and to file a complaint in mandamus against the sheriff.
January 7, 1982 - The sheriff moved the court to dismiss plaintiff's petition for mandamus.
January 26, 1982 - The city filed a petition for relief under section 2-1401 of the Code of Civil Procedure (Ill. Rev. Stat. 1981, ch. 110, par. 2-1401). The city conceded that Yusim had not been made a party to the proceeding for foreclosure of the demolition lien.
July 6, 1982 - The trial court entered a final order holding that it lacked subject matter jurisdiction to enter the final judgment in the foreclosure proceedings. The order stated that the pertinent statute requires that the city's suit to foreclose the demolition lien must be commenced within three years after the date of the filing of the notice of lien. (Ill. Rev. Stat. 1981, ch. 24, par. 11-31-1.) Consequently, the trial court held that the judgment of foreclosure upon which the sheriff's sale was based was void. The certificate of sale issued by the sheriff was ordered cancelled and the sheriff was directed to refund the amount of plaintiff's bid. Plaintiff appeals.
Section 72(5) of the Civil Practice Act, now known as the Code of Civil Procedure, provides in pertinent part (Ill. Rev. Stat. 1981, ch. 110, par. 2-1401(e)):
"Unless lack of jurisdiction affirmatively appears from the record proper, the vacation or modification of an order or judgment pursuant to the provisions of this Section does not affect the right, title or interest in or to any real or personal property of any person, not a party to the original action, acquired for value after the entry of the order or judgment but before the filing of the petition, nor affect any right of any person not a *367 party to the original action under any certificate of sale issued before the filing of the petition, pursuant to a sale based on the order or judgment."
Plaintiff argues that any jurisdictional defect regarding the judgment for sheriff's sale did not affirmatively appear from the record. Therefore, plaintiff contends, the judgment was valid, the collateral attack was improper, and plaintiff's claim to title is superior to that of Yusim.
A similar argument was rejected by this court in In re Application of County Collector (1977), 48 Ill. App.3d 572, 362 N.E.2d 1335, appeal denied (1977), 66 Ill.2d 629. There we concluded that the property involved was exempt from taxation. We held that the trial court did not have jurisdiction over the property. We stated a tax deed order "concerning land over which the court [has] no jurisdiction [is] void. It is generally true that an order or judgment rendered without jurisdiction is subject to collateral attack by any party in the context of any proceeding in which the validity of that order or judgment later becomes relevant." 48 Ill. App.3d 572, 586.
In the case at bar, the statute which authorizes municipalities to foreclose a lien on property provides that "Suit to foreclose this lien must be commenced within 3 years after the date of filing notice of lien." (Ill. Rev. Stat. 1981, ch. 24, par. 11-31-1.) The city failed to file its foreclosure suit within the time prescribed by the statute. Because the mandatory requirements of the statute were not complied with, the judgment for sheriff's sale was void and the collateral attack by Yusim was proper. In re Application of County Collector (1977), 48 Ill. App.3d 572, 586.
In the instant case, the defect in jurisdiction did in fact appear on the record. The city's suit for foreclosure stated the date of the lien. Therefore the fact that the city failed to file its suit for foreclosure in a timely manner, appears affirmatively from the pleadings.
 1 Finally, the protection offered by the Code of Civil Procedure regarding subsequent purchasers of real property, quoted above, applies only to bona fide purchasers for value. (Freisinger v. Interstate Bond Co. (1962), 24 Ill.2d 37, 44, 179 N.E.2d 608; Ford City Bank & Trust Co. v. Ford City Bank & Trust Co. (1982), 110 Ill. App.3d 123, 128, 441 N.E.2d 1192, appeal denied (1983), 93 Ill.2d 542.) A subsequent purchaser cannot be a bona fide purchaser for value if he has actual or constructive notice of the outstanding rights of other parties. Petta v. Host (1953), 1 Ill.2d 293, 303-04, 115 N.E.2d 881.
 2 In the case at bar, plaintiff had constructive notice of Yusim's interest in the property. The record before us indicates that Yusim's *368 deed was properly recorded on April 20, 1977. The sheriff's sale was not held until June 3, 1981. Thus, plaintiff was put on constructive notice of the records of the recorder of deeds and plaintiff was not a bona fide purchaser. Smith v. Grubb (1949), 402 Ill. 451, 464-65, 84 N.E.2d 421.
In addition, the record shows that Yusim was in open, visible, exclusive, and unambiguous possession of the property. Yusim used the property for storage of automobiles continuously for more than four years. Such possession put plaintiff on constructive notice of Yusim's interest in the property. Plaintiff was bound to inquire into the nature and extent of Yusim's interest. Beals v. Cryer (1981), 99 Ill. App.3d 842, 845, 426 N.E.2d 253.
In his reply brief plaintiff urges that Yusim had actual knowledge of the unsatisfied demolition lien filed by the city against the property. Plaintiff refers to this as a fact which should have put Yusim on inquiry. It is correct, as shown by the above chronology, that Yusim purchased the property on April 8, 1977, almost one year after recordation of the city's demolition lien. However, the mere recording of the lien is of no significance. The important fact here from a legal point of view is that the city did not file its complaint to foreclose its lien until July 2, 1979, more than two years after Yusim had purchased the property. Also, the crucial matter is not the knowledge of Yusim but the constructive knowledge charged against plaintiff and the total lack of jurisdiction of the trial court to order sale of the real estate by the sheriff.
It follows necessarily that the sheriff did not have a clear legal duty to issue a deed conveying the property to plaintiff. Therefore, it would have been improper for the trial court to grant mandamus against the sheriff. In re Claudia K. (1982), 91 Ill.2d 469, 476, 440 N.E.2d 78; Aimone v. Finley (1983), 113 Ill. App.3d 507, 509, 447 N.E.2d 868.
For these reasons the judgment appealed from is affirmed.
McGLOON and CAMPBELL, JJ., concur.
