• Hi,

    Email Before Download is a plugin which allows a user to enter their email address in order to gain access to download links.

    After installing Autoptimize, I had an issue with the links not showing after the user enters their data. Through a process of elimination I found the cause was the Optimize Javascript option in Autoptimize. Once I disabled it, the EBD plugin worked fine.

    I would like to optimise my javascript, but I have no idea what Autoptimize was doing that prevented the EBD plugin from working.

    Any ideas?

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Frank Goossens

    (@futtta)

    as per the FAQ you can (and in this case should) troubleshoot by excluding the relevant JS from optimization.

    now if you do NOT aggregate inline JS and if you exclude js/jquery/jquery.js (both are default settings as from AO 2.1), then chances are big everything will work out of the box.

    hope this helps,
    frank

    Thread Starter outpost33

    (@outpost33)

    Hi Frank – thanks for your swift response.

    That’s kind of what I thought, but I’m a relative novice, and I don’t know how to identify the relevant JS to exclude. Could you point me in the right direction?

    Plugin Author Frank Goossens

    (@futtta)

    well, first of all did you indeed

    NOT aggregate inline JS and if you exclude js/jquery/jquery.js

    Thread Starter outpost33

    (@outpost33)

    Ok, I just did that. Now the links do not appear again.

    Plugin Author Frank Goossens

    (@futtta)

    can you share the link to your site (and specifically the page where I can see the problem) here or via futtta-at-gmail-dot-com?

    Plugin Author Frank Goossens

    (@futtta)

    ok, could you give the link to the page where this is happening?

    Thread Starter outpost33

    (@outpost33)

    Thanks – I have disabled Optimize Javascript, so currently if you enter your details the download links work. Do you want me to leave it disabled for the time being?

    https://www.andrewcohen.com/awakening-authentic-self-disc-01/

    Plugin Author Frank Goossens

    (@futtta)

    I would need to see it broken, really ??

    Or test it yourself and check your browser console for JS errors and copy/paste those here?

    Thread Starter outpost33

    (@outpost33)

    Ok – I have broken it now. Please try the link again and enter some details. The links would usually appear under the message, but now with Optimize JS enabled they won’t appear:

    https://www.andrewcohen.com/awakening-authentic-self-disc-01/

    Plugin Author Frank Goossens

    (@futtta)

    ok, not an easy one. try adding

    contact-form-7/includes/js

    to the comma-separated JS exclusion-list (keeping js/jquery/jquery.js in there too).

    Thread Starter outpost33

    (@outpost33)

    Nope, that didn’t work.

    Plugin Author Frank Goossens

    (@futtta)

    darn … in that case (until a better solution can be found) I would exclude that page from autoptimization, using code like this (you can use the code snippets plugin to manage such .. code snippets);

    add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
    function my_ao_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'awakening-authentic-self-disc-01/')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    frank

    Thread Starter outpost33

    (@outpost33)

    I couldn’t get the Code Snippets plugin to work. It installs, but refuses to activate. Would I add the above code to my functions.php?

    Plugin Author Frank Goossens

    (@futtta)

    yeah, functions.php should also work (but you’ll have to remember to re-add the snippet when updating themes). or you could make it a mini-plugin? ??

    Thread Starter outpost33

    (@outpost33)

    I’m using a child theme in X, so I could just add it to the functions.php of the child?

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Conflict with Email Before Download plugin’ is closed to new replies.