How to Fix "Error: 0 - Argument 1 passed to xmap_com_content::getTree() must be an instance of XmapDisplayer"

With OSMap Free, you may receive the following error:

Error: 0 - Argument 1 passed to xmap_com_content::getTree() must be an instance of XmapDisplayer, instance of Alledia\OSMap\Sitemap\Collector given

One of the possible reasons for this error could be using out-of-date OSMap Free 4.2.30.

To fix this error, install the latest version of OSMap Free.