WordPress.org

Ready to get started?Download WordPress

Forums

eBibleicious
The script is being added incorrectly, causing a Javascript error (1 post)

  1. Chris Jean
    Member
    Posted 2 years ago #

    This plugin has not been updated in a long time and could really use some updates. It seems that the externally loaded Javascript code was modified at some point, breaking this plugin.

    Activating the plugin and loading the site results in the following error:

    document.body is null

    This is because the script is being printed in the head of the site, before the body tag is rendered and the Javascript attempts to immediately run appendChild on the body.

    A quick and dirty fix is to change the following line:

    add_action('wp_head', 'includeJSHeader', 40);

    to

    add_action('wp_footer', 'includeJSHeader', 40);

    While this fixes the issue, the plugin really should be updated to properly enqueue the script and stylesheet using wp_enqueue_script and wp_enqueue_style, respetively; to properly use capabilities for adding to the menu rather than a number; and to update the editor to more closely match the UI design of WordPress.

    http://wordpress.org/extend/plugins/ebibleicious/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic