• 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 8 replies - 16 through 23 (of 23 total)
  • Plugin Author Frank Goossens

    (@futtta)

    yep ??

    Thread Starter outpost33

    (@outpost33)

    Thanks so much for your continued help with this.

    I added the code to the child theme’s function.php, but it broke Cornerstone (X theme’s front end page builder). When I removed the code, Cornerstone recovered.

    Any idea what could be going on there?

    • This reply was modified 8 years, 6 months ago by outpost33.
    Plugin Author Frank Goossens

    (@futtta)

    hmmm .. weird.

    try this;
    * create a new file
    * put this in it;

    <?php
    /*
    Plugin Name: Outpost Noptimize
    Plugin URI: https://andrewcohen.com/
    Description: Stop autoptimize on download page
    Author: outpost33
    Version: 0.1
    Author URI: https://andrewcohen.com/
    */
    
    add_filter('autoptimize_filter_noptimize','outpost_noptimize',10,0);
    function outpost_noptimize() {
    	if (strpos($_SERVER['REQUEST_URI'],'awakening-authentic-self-disc-01/')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    * save as “outpost_noptimize.php”
    * put it in wp-content/plugins
    * go to plugins and activate “Outpost Noptimize”

    hope this does work (it should).

    frank

    Thread Starter outpost33

    (@outpost33)

    Interesting.

    When the noptimize plugin I created is activated, and Optimize Javascript is ticked, it still breaks Cornerstone.

    Plugin Author Frank Goossens

    (@futtta)

    well, the only goal of the noptimize-plugin is not to optimize on your download page. cornerstone (being a page builder, heavily relying on JS) will need some more TLC, as in changing this line of code;

    if (strpos($_SERVER['REQUEST_URI'],'awakening-authentic-self-disc-01/')!==false) {
    into
    if (strpos($_SERVER['REQUEST_URI'],'awakening-authentic-self-disc-01/')!==false || is_user_logged_in()) {

    this disables AO on the download page OR if you’re logged in (which is one way to identify when you might be needing a page builder).

    frank

    Thread Starter outpost33

    (@outpost33)

    Hi Frank,

    Thanks for your continued help with this issue. I’m trying to temporarily deactivate the plugin so I can diagnose another issue with Events Manager, but Autoptimize refuses to deactivate. WordPress gives me the deactivation message, but the plugin remains active.

    Thread Starter outpost33

    (@outpost33)

    Ignore previous message – plugin is deactivating fine now.

    Cheers!

    Plugin Author Frank Goossens

    (@futtta)

    ??

    you can stop AO on a per-request basis by adding ?ao_noptimize=1 to the URL. might be more handy ??

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