• Resolved chickendipper

    (@chickendipper)


    Hello,

    I have an issue where if a user logs in to my website then logs out, the social login buttons on the login page no longer work and will only work again after reloading the browser web page manually.
    Is there any way to fix this?

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi,

    If you post the URL of the web page where you are facing this issue, I would be able to check.

    Thread Starter chickendipper

    (@chickendipper)

    Hello,

    The url is: https://ukradio.live/account

    Thank you.

    Plugin Author Heateor Support

    (@heateor)

    I am seeing an error in the browser console after clicking the social login icon after logging out of the website – “theChampInitiateLogin is not defined”. The Javascript file common.js is there in its place which has this function defined. It’s happening because your web pages are being loaded via AJAX. Try unchecking the Load Javascript in website footer checkbox at the Super Socializer > General Options page and see if this makes any difference.

    Thread Starter chickendipper

    (@chickendipper)

    Hi,

    Thanks for looking. I have tried unchecking the load javascript in site footer but it remains the same, is there anything else I can try?

    I have been provided js reinit snippets to use for other plugins to resolve issues, not sure if this is possible here?

    Thank you.

    Plugin Author Heateor Support

    (@heateor)

    Does your theme offer any hook/action that can be used to reload the Javascript whenever someone navigates to another page?

    Thread Starter chickendipper

    (@chickendipper)

    Yes it gives me the option to add additional JS.

    I also use the custom css & js plugin to achieve the same, would I be able to reload the js for Super Socializer to fix the issue?

    Thanks.

    • This reply was modified 2 years, 10 months ago by chickendipper.
    Plugin Author Heateor Support

    (@heateor)

    I have been provided js reinit snippets to use for other plugins to resolve issues, not sure if this is possible here?

    Can you post some code there that you have been provided in past to make things work with this theme?

    Thread Starter chickendipper

    (@chickendipper)

    Sure, this is used for the a3 lazy load plugin.

    (function($) { $(document).on(‘pjax:complete’, function() { setTimeout(function() { jQuery(window).lazyLoadXT(); }, 1 ); }); })(jQuery);

    Thanks

    Plugin Author Heateor Support

    (@heateor)

    Okay. You can try placing the following code in the functions.php file of your active theme and check if it makes any difference.

    /**
     * Custom Javascript to make Social Login work
     */
    function heateor_ss_custom_script() {
        if ( defined( 'THE_CHAMP_SS_VERSION' ) ) {
        	?>
        	<script>
        	(function($) { $(document).on('pjax:complete', function() { setTimeout(function() { var heateorCommonJsElement = document.createElement("script"); var heateorGeneralJsElement = document.createElement("script"); heateorCommonJsElement.src = '<?php echo plugin_dir_url( 'super-socializer/super_socializer.php' ) . 'js/front/social_login/common.js'; ?>'; heateorGeneralJsElement.src = '<?php echo plugin_dir_url( 'super-socializer/super_socializer.php' ) . 'js/front/social_login/general.js'; ?>'; document.body.appendChild(heateorCommonJsElement); document.body.appendChild(heateorGeneralJsElement); }, 1 ); }); })(jQuery);
        	</script>
        	<?php
       }
    }
    add_action( 'wp_footer', 'heateor_ss_custom_script' );
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Social buttons do not work after logout’ is closed to new replies.