IP2Location Country Blocker, 2.19.1 fix
One commented-out line that put the archive pages back.
After updating IP2Location Country Blocker to version 2.19.1, every post printed index.php and archive pages stopped showing. I traced it to a debug line in the main plugin file and published the fix.
What you are looking at
- Line 1823: a leftover echo, commented out.
- Nothing else in the plugin changes.
Screenshot from the original project, April 2022 or earlier.
// what-it-does
What it does
A small bug with a loud symptom.
Version 2.19.1 shipped with a debug echo inside is_backend_page(). It printed the current page name into every post, and archive pages stopped rendering.
The fix: open ip2location-country-blocker.php, go to line 1823 and comment the line out by adding // at the start.
// line 1823, before echo $GLOBALS['pagenow']; // after //echo $GLOBALS['pagenow'];
// how-it-was-built
How it was built
A patched copy of one release, published the day I found it.
The plugin belongs to IP2Location. I published the patched copy and the steps for anyone stuck on 2.19.1.
Archived. It only ever applied to version 2.19.1.
// portfolio/
Where the work went next
The portfolio is the record. The plugins, apps and systems I still maintain have their own pages, with current versions and numbers.
- PortfolioEvery old project, filterable by category
- ProductsThe plugins, apps and systems I keep running
- Open sourceEvery public project, with its status and numbers
- Ultimate InvoiceInvoices, slips and labels for WooCommerce
- Advanced Profile SolutionGrown from Ultimate Profile Solutions
- Receipt Uploader for WooCommerceBank transfer receipts, against the right order
- ServicesWordPress, WooCommerce and custom builds today