Blog

WordPress

Posted on

WordPress Popular Posts 7.1: Improved WP Rocket Compatibility plus Various Fixes

Version 7.1 is, for the most part, a maintenance release.

Users reported a couple of issues which have been addressed in 7.1.0. Also, some tweaks have been added to improve compatibility with the highly popular WP Rocket plugin.

Version 7.1.0 is mostly a maintenance focused release, fixing some issues reported by the community and some I detected myself while working on the plugin.

PHP Fatal Error on the Block-based Widgets screen

@andymoonshine reached out to report an issue where the “classic” widget would trigger a PHP fatal error on the block-based Widgets screen under specific circumstances. This PHP error would prevent Andy -and possibly other users too- from accessing the Widgets screen which of course isn’t great.

The bug was accidentally introduced in version 7.0 and thanks to Andy’s detailed report I was able to diagnose it and fix it.

If you’re affected by this please update to version 7.1 or newer as soon as possible.

The [wpp] shortcode isn’t adding the “current” CSS class to the current post

When you use the WordPress Popular Posts block on your sidebar or even within a post, the block has the ability to tell if the current post / page / custom post type is on the popular posts list and if so it’ll add a “current” CSS class to it so users can -for example- style the current post differently from the other posts on the list.

The [wpp] shortcode was supposed to have that same functionality but it wasn’t working. This release fixes that problem.

A long standing albeit small bug has been fixed

@wpfed shone a light on a small PHP warning that only one other user reported months prior but that remained unfixed until now due to lack of information.

This particular PHP warning should impact only a very small subset of users so chances are you’re not being affected by this. Still, it’s something that needed to be addressed and version 7.1.0 takes care of it. Thanks again, @wpfed!

Improved compatibility with WP Rocket

WP Rocket is a well-known page caching plugin that people often use on their sites to help improve overall performance by automating some tasks that would otherwise need to be done manually and are time-intensive, like serving static HTML pages instead of PHP generated ones, loading site assets from a CDN to reduce latency, script minification / deferring, etc.

As it happens with other page caching plugins, being overly aggressive with these optimization tweaks can often lead to some site features not working as intended. In WPP’s case, the plugin might stop tracking visits and / or fail to load your popular posts list for example.

Plugin version 7.0.1 introduced a compatibility layer that helps WordPress Popular Posts integrate better with sites using these kind of plugins, reducing or even fully eliminating chances of conflicts with them that may prevent WPP from doing its job.

Version 7.1.0 adds a compatibility layer specifically for WP Rocket which should ensure that WordPress Popular Posts can continue to work when said plugin is installed on a site (or at least reduce the chances of something breaking because of some misconfiguration with WP Rocket.)

If you’re using WP Rocket or any other page caching plugin on your site it’s highly recommended to clear its page cache after installing / upgrading to WPP version 7.1.0.