Support » Plugin: ActiveCampaign » Plugin includes JavaScript on all admin pages

  • Hi,

    I only have minimal knowledge of this plugin as I’m fixing a support item for our own plugin (Meta Slider). I’ve installed the plugin, signed up to Active Campaign and entered the API details into the plugin (I have not set up any forms in Active Campaign)

    I’ve spotted a couple of things:

    1. There is a syntax error in the JavaScript which is output to all admin pages somewhere. I think this is probably related to this ticket:

    You can see the error in the Console (using Chrome Developer Tools).

    2. The JavaScript is included on all admin pages. Please could you update the plugin so the JavaScript is only output on the necessary pages? I think this should do it:

    Open activecampaign.php. Find line 563. Add just below:

    global $pagenow;
    	// Only run in post/page creation and edit screens
    	if (!in_array($pagenow, array('post.php', 'page.php', 'post-new.php', 'post-edit.php'))) {

    For the benefit of our customer (who I’m about to link here), here is a screenshot of how it should look:


Viewing 1 replies (of 1 total)
  • Plugin Author activecampaign


    Hi Tom,

    Thanks for the feedback. We’ve just implemented #2, as this is a great idea (and good catch). For #1, I am not seeing any errors currently. I’d love to get a screenshot (or exact error text) so we can look into it further.

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin includes JavaScript on all admin pages’ is closed to new replies.