Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author jazzs3quence

    (@jazzs3quence)

    Hm. That’s really odd. What version do you have installed? I just committed an update today. I haven’t seen this on the sites I’ve installed the plugin to, but you’re the second person who’s reported an issue like this so there’s obviously something going on. Do you have the banner or the modal active and what happens when you switch to the other one?

    Thread Starter joshlf13

    (@joshlf13)

    Hahah I was just about to test that. And…

    Ok, so I switched from banner (which was the cause of the original problem) to modal. Now nothing happens. Page loads normally, but no modal overlay pops up. I ctrl-f’d for “internetdefense” and found only my own footer image (unrelated to your plugin).

    Btw, my site’s joshlf.com if you want to check out the source.

    Plugin Author jazzs3quence

    (@jazzs3quence)

    If nothing happens, that’s actually fine because there isn’t an active campaign. I added some notes to the description to indicate that if you don’t see anything happening that’s okay. There probably won’t be until June or whenever they run their next campaign. I can see it’s running normally in your footer, so that’s good — when there is a campaign, it’ll display automagically: https://cl.ly/image/3v0y2g1j1L3s

    It looks like you’re using 1.0.2, so there’s definitely something going on with the banner in that version. I’ll take another look. The really odd thing is I haven’t seen that at all in testing.

    FWIW, what you’d want to ctrl+f for is either cat-signal or modal/banner (depending on which option you chose).

    Plugin Author jazzs3quence

    (@jazzs3quence)

    Can you give me a list of the active plugins you’re running on your site? I’m trying to reproduce it and can’t force it to happen. Do you have a caching plugin like W3 total cache or WP SuperCache maybe?

    Plugin Author jazzs3quence

    (@jazzs3quence)

    FOUND IT! Completely different thing than what I was looking at.

    Okay, so, I’m assuming what you did was, download the plugin, activate, then went to the front of your site, right? E.g. you didn’t set what type of alert you wanted, you just went on about your business. The plugin loads the javascript relative to your selection on the admin page, like this:

    function idl_signal_all_the_cats() {
    	$options = get_option( 'cat_signal' );
    	if ( !is_admin() ) {
    		if ( $options['type'] == 'banner' ) {
    			wp_enqueue_script( 'idf-banner', CAT_SIGNAL_PLUGIN_URL . 'js/banner.js', array(), '1.0', false );
    		} elseif ( $options['type'] == 'modal' ) {
    			wp_enqueue_script( 'idf-modal', CAT_SIGNAL_PLUGIN_URL . 'js/modal.js', array(), '1.0', false );
    		} else {
    			die();
    		}
    	}
    }

    The problem was that die() command which fires if there’s no option set. I’ve fixed it and it will be live shortly.

    Thread Starter joshlf13

    (@joshlf13)

    Ok, sweet! Good catch.

    Plugin Author jazzs3quence

    (@jazzs3quence)

    Thanks. That means in practice, you fixed the issue by switching to Modal since saving anything would prevent that die() from triggering. But the fix I’m adding will make it doubly safe, because I’m setting a default instead of just quitting.

    Thread Starter joshlf13

    (@joshlf13)

    Yeah, I gotcha. I suppose it’s not really a security hole to return something if the wrong param is set. It doesn’t leak any useful information, anyway.

    Plugin Author jazzs3quence

    (@jazzs3quence)

    It’s not even the wrong param, it’s no param. I considered doing a check for a value and not loading anything if no option was set, but that could lead to “I installed your plugin and nothing happened AND there’s a current campaign active”, “well, did you set an option?”, “no”…

    This way you can just install it and then forget it even exists.

    Thread Starter joshlf13

    (@joshlf13)

    Yeah, exactly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘index.php quits after wordpress meta tag’ is closed to new replies.