Title: [Plugin: CF Internal Link Shortcode] Debug Errors
Last modified: August 20, 2016

---

# [Plugin: CF Internal Link Shortcode] Debug Errors

 *  [vidhill](https://wordpress.org/support/users/vidhill/)
 * (@vidhill)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-debug-errors/)
 * In Debug mode the plugin is throwing the following error:
 * `wp_enqueue_script was called incorrectly. Scripts and styles should not be registered
   or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks.`
 * [http://wordpress.org/extend/plugins/internal-link-shortcode/](http://wordpress.org/extend/plugins/internal-link-shortcode/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [vidhill](https://wordpress.org/support/users/vidhill/)
 * (@vidhill)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-debug-errors/#post-2897446)
 * I have written a fix myself, at line 205
 * instead of
 *     ```
       if (is_admin()) {
       	wp_enqueue_script('cfplsc_admin_js', trailingslashit(get_bloginfo('url')).'?cf_action=cfplsc_admin_js', array('jquery'));
       }
       ```
   
 * (which would add the script on all admin pages)
 * I added this:
 *     ```
       add_action("admin_print_scripts-post.php", 'cfplsc_load_admin_js' );
   
       	function cfplsc_load_admin_js() {
       		wp_enqueue_script('cfplsc_admin_js', trailingslashit(get_bloginfo('url')).'?cf_action=cfplsc_admin_js', array('jquery'));
       	}
       ```
   
 * the script is only added to post.php admin pages

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: CF Internal Link Shortcode] Debug Errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/internal-link-shortcode_a9c9d7.svg)
 * [CF Internal Link Shortcode](https://wordpress.org/plugins/internal-link-shortcode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/internal-link-shortcode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/internal-link-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/internal-link-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/internal-link-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/internal-link-shortcode/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [vidhill](https://wordpress.org/support/users/vidhill/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-cf-internal-link-shortcode-debug-errors/#post-2897446)
 * Status: not resolved