• (I know this plugin is no longer maintained, but maybe someone will also run into the problem and will find this searching for answers.)

    My versions:

    • WordPress 5.8
    • PHP 7.4.21
    • Academic Blogger’s Toolkit 5.2.2
    • Reproduced with Twenty Nineteen and OnePress theme on a blank blog

    The plugin breaks the WordPress customizer and an error message appears in the logs:

    
    2021/07/27 11:18:23 [error] 5185#5185: *1107402 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to ABT\Editor\init_editor_state() must be of the type int, null given, called in /srv/www/sites/web.site/wp-content/plugins/academic-bloggers-toolkit/php/editor.php on line 24 and defined in /srv/www/sites/web.site/wp-content/plugins/academic-bloggers-toolkit/php/editor.php:59
    Stack trace:
    #0 /srv/www/sites/web.site/wp-content/plugins/academic-bloggers-toolkit/php/editor.php(24): ABT\Editor\init_editor_state()
    #1 /srv/www/sites/web.site/wp-includes/class-wp-hook.php(303): ABT\Editor\enqueue_scripts()
    #2 /srv/www/sites/web.site/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 /srv/www/sites/web.site/wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 /srv/www/sites/web.site/wp-includes/class-wp-customize-widgets.php(873): do_action()
    #5 /srv/www/sites/web.site/wp-includes/class-wp-hook.php(303): WP_Customize_Widgets->enqueue_scripts()
    

    The problem is that in the customizer $post->ID is null and that causes the crash. (Maybe previous versions of WP or PHP were more lenient, as the crash didn’t appear 4 months ago.)

    Deactivating the plugin makes the customizer usable again, so that may be a temporary workaround until you’re done customizing.

    • This topic was modified 3 years, 7 months ago by Simon. Reason: Formatting
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for posting this. I found it also crashes Appearance > Widgets.

    I suppose it was just a matter of time until ABT started to be incompatible with new WordPress versions. It’s just sad because I have scores of pages that use it, and need to occasionally update the pages with new references. Eventually that won’t be possible I suppose. And there’s no similar replacement AFAIK.

    I presume, dsifford does not longer maintain the plugin? ??

    I also use(d) the much less sophisticated and similarly orphaned “WP-footnotes” for the same purpose. It still works but is no longer available for download afaik.
    And, unfortunately, curating and formatting of citations has to be done manually.

    If you’re happy to edit the plugin directly (not usually recommended as edits will be lost on updates – but unlikely in this case) try this modification to /php/editor.php:-

    function enqueue_scripts() {
    	global $post;
            // Check for null passed.
    	if ( ! $post  ) {
    		return;
    	}
    .
    .
    .
    

    It’s a similar test to what is already done in frontend.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘ABT crashes WordPress Customizer’ is closed to new replies.