Popup maker fatal error in ClassicPress 2.0

Popup maker fatal error in ClassicPress 2.0

But it works fine on ClassicPress version 1.7.3.

The plugin repository says it’s compatible with my version, (2.0)
In the plugin details it also says that the plugin requires wordpress 4.9 and up.
But after activating the plugin fatal error
Watch the movie until the end of the behavior of this plugin

So version 2.0 will wait a little longer for my websites
Until further notice, I’m staying with ClassicPress 1.7.3

EDIT: A few more plugins have a fatal bug on the 2.0 version of the CP.
While on version 1.7.3 they work neatly

Hi Jerry,
Getting Popup Maker to work only required a minor edit.
The reason it works in CP v1 is because the plugin sees CP v1 as WP v4.9 and disables Block functions. However, the same check in CP v2 reports WP v6.2.3, so the plugin tries to enable Block functions. This is not really a bug with ClassicPress, but more in the way the plugin is assuming Blocks are enabled after WP v5.

The quick fix is to change line 130 in the file:
popup-maker/classes/Admin/BlockEditor.php
from
if ( version_compare( $wp_version, '5.0' ) === -1 ) {
to
if ( ( version_compare( $wp_version, '5.0' ) === -1 ) || function_exists( 'classicpress_version' ) ) {

The plugin author could add this sort of check to be compatible with ClassicPress.
Fixing most plugins that do not actually need Blocks so they work in ClassicPress is usually a minor edit like this and the error code tells you where to start looking.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.