Does this have a time limit between messsages?

I dont believe I can give support login, but its just wierd, I can get messages to show after a long period of time, and it seems like theres a time out on the IP or something

I tried removing cookies and such but, nothing is working. My consoles dont show any errors, and the hook is set to wp_footer.

It has worked perfectly like twice but it seems like it blocks the message or even any other message if there was a message shown in a certain period of time. Is this the case?

  • John
    Array (
    	[show_after-condition] => percentage
    	[show_after-rule] => 60
    	[show_for-time] => 5
    	[show_for-unit] => m
    	[on_hide] =>
    	[reshow_after-time] =>
    	[reshow_after-units] =>
    	[position] => right
    	[width] => full
    	[theme] => minimal
    	[variation] => light
    	[scheme] => blue
    	[services] => Array (
    		[google] => google
    		[facebook] => facebook
    		[twitter] => twitter
    		[linkedin] => linkedin
    	)
    	[new_service] => Array (
    		[name] =>
    		[code] =>
    	)
    	[mailchimp-api_key] =>
    	[css-custom_styles] =>
    	[allow_shortcodes] =>
    	[allow_widgets] =>
    	[custom_injection_hook] => wp_footer
    )

    This is a rough pre print_r of the wdsi option, var dump was to ugly to even think about managing on 48 hours no sleep

    Ive also tried over ruling the global settings, and tried all options i could think that would make it work.

  • John

    On further digging
    Wdsi_SlideIn::message_markup($message, $opts);
    on line 152 of class_wdsi_public_pages is returning empty string,
    Output in the called function is returning true
    and Out is returning empty string

    this is on every page that the box should work
    Including homepage and singular pages.

    Not sure if this helps.

    Heres a var_dump style of the $opts passed to that to confirm that the settings are correct.

    Array
    (
        [show_after-condition] => percentage
        [show_after-rule] => 60
        [show_for-time] => 5
        [show_for-unit] => m
        [on_hide] =>
        [reshow_after-time] =>
        [reshow_after-units] =>
        [position] => right
        [width] => full
        [theme] => minimal
        [variation] => light
        [scheme] => blue
        [services] => Array
            (
                [google] => google
                [facebook] => facebook
                [twitter] => twitter
                [linkedin] => linkedin
            )
    
        [new_service] => Array
            (
                [name] =>
                [code] =>
            )
    
        [mailchimp-api_key] =>
        [css-custom_styles] =>
        [allow_shortcodes] =>
        [allow_widgets] =>
        [custom_injection_hook] => wp_footer
    )

    And a var_dump of $message passed to the message_markup on like 152

    WP_Post Object
    (
        [ID] => 1667
        [post_author] => 13
        [post_date] => 2015-03-31 17:54:29
        [post_date_gmt] => 2015-03-31 21:54:29
        [post_content] => gfhggfh
        [post_title] => Hello There
        [post_excerpt] =>
        [post_status] => publish
        [comment_status] => closed
        [ping_status] => closed
        [post_password] =>
        [post_name] => hello-there
        [to_ping] =>
        [pinged] =>
        [post_modified] => 2015-03-31 18:25:08
        [post_modified_gmt] => 2015-03-31 22:25:08
        [post_content_filtered] =>
        [post_parent] => 0
        [guid] => http://grosource.dev/?post_type=slide_in&p=1667
        [menu_order] => 0
        [post_type] => slide_in
        [post_mime_type] =>
        [comment_count] => 0
        [filter] => raw
    )

    and var dumps of $output and $out that is returned by the called function.

    string '' (length=0)
    boolean true

    if I set $output to false, it prints out the box but no javascript is triggered, so kinda does tell me that theres some kind of time trigger that sets that $output variable to true and not allow ob_start to call.

    One last edit, Ive set theme to a fresh install of TwentyFifteen and disabled all plugins, and no luck. Still not showing.

    I know this is a really long response, but if it helps cool.

  • John

    One more post

    The plugin works fine in Chrome in Incognito mode or what ever its called. It also works if you clear your cache. How do you fix this, cause obviously i cant rely on the end user to clear their cache

    If you load the page a few times its fine, but when it caches the boxes stop. Could just be my browser but if im having the issue then someone else will too. Atleast i know what the issue is, but how do we fix it?

    Fixed it:

    wp_enqueue_script('wdsi', WDSI_PLUGIN_URL . '/js/wdsi.js', array('jquery'), rand(1,200));
    	wp_enqueue_script('wdsi', WDSI_PLUGIN_URL . '/js/wdsi.js', array('jquery'), WDSI_CURRENT_VERSION);

    adding rand to the version fixes the issue. Found on line 74 of class_wdsi_public_pages.php. Note this issue does not occur outside of chrome.

    A quick untested fix:

    loader.php line 27:

    $browser = get_browser( null, true );
    $browser = $browser['browser'];
    $version = '1.2';
    if( $browser == 'Chrome' ){ $version = rand( 1, 200 ); }
    define ('WDSI_CURRENT_VERSION', $version, true);

    Though I dont know why chrome is caching so much, probably another unstable release or something, but there you go thats the fix.

    Though I just realized that you probably use that definition elsewhere for version control so who knows, im to tired, 50 hours no sleep, goin to bed.

    One more edit, remember with get_browser you need browscap in php.ini to be set, i have it set but it doesnt come prebundled. May need to find another way to get the browser info. And not everyone has problems with chrome, it really depends on your browser version. Chrome is pretty screwy sometimes.

  • Vinod Dalvi

    Hi John,

    I hope you are well today and thanks for posting on the forum.

    Could you please share me your site URL so that i can test it?

    The plugin works fine in Chrome in Incognito mode or what ever its called. It also works if you clear your cache. How do you fix this, cause obviously i cant rely on the end user to clear their cache

    Please try using different browser.

    It would be helpful to troubleshoot the issue if you just temporary grant us the support staff access of your access but if you can't then just share the screenshot of your Slide in settings as displayed din my shared screenshot.

    Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.