• Seeing this error:

    Uncaught ReferenceError: heateorSsHorSharingShortUrl is not defined
        at e.text (sharing.js?ver=7.11.13:842)
        at e.t (sharing.js?ver=7.11.13:897)
        at HTMLBodyElement.<anonymous> (sharing.js?ver=7.11.13:897)
        at HTMLBodyElement.<anonymous> (sharing.js?ver=7.11.13:897)
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Heateor Support

    (@heateor)

    Would you let us know the url of your webpage where this is happening so that we can check what’s wrong?

    Thread Starter eligence

    (@eligence)

    Thank you for you timely response. I am unable to do that as the site is not currently live.

    Thread Starter eligence

    (@eligence)

    I’m using the shortcode in a loop where the url param is set dynamically

    do_shortcode('[TheChamp-Sharing url="' . get_permalink($postID) . '"]')

    All the other sharing options work as expected (ie facebook, twitter, etc.) Hope that helps

    Thread Starter eligence

    (@eligence)

    Replace sharing.js line 833-853 with the following:

    var heateorSsClipboard = new Clipboard('.theChampCopyLinkBackground, .theChampCopyLinkShare, .theChampCopyLinkSvg', {
            text: function (trigger) {
                if (jQuery(trigger).hasClass('theChampCopyLinkShare')) {
                    var element = trigger.parentElement.parentElement.parentElement.parentElement;
                    var url = jQuery(element).attr("data-href") || "";
                } else if (jQuery(trigger).hasClass('theChampCopyLinkSvg')) {
                    var element = trigger.parentElement.parentElement.parentElement.parentElement;
                    var url = jQuery(element).attr("super-socializer-data-href") || "";
    
                    if (url === "") {
                        if (jQuery(element).hasClass('the_champ_horizontal_sharing') && typeof heateorSsHorSharingShortUrl != undefined) {
                            var url = heateorSsHorSharingShortUrl;
                        } else if (jQuery(element).hasClass('the_champ_vertical_sharing') && typeof heateorSsVerticalSharingShortUrl != undefined) {
                            var url = heateorSsVerticalSharingShortUrl;
                        }
                        if (!url) {
                            var element = trigger.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
                            var url = jQuery(element).attr("data-href") || "";
                        }
                    }
    
                }
                return url;
            }
        });

    Need to only reset var url if super-socializer-data-href is empty. Currently it gets the value from super-socializer-data-href and then redefines it in this condition:

    if(jQuery(element).hasClass('the_champ_horizontal_sharing') && typeof heateorSsHorSharingShortUrl != undefined){
                            var url = heateorSsHorSharingShortUrl;
    				}
    Plugin Author Heateor Support

    (@heateor)

    We will take care of this in upcoming releases.

    Thread Starter eligence

    (@eligence)

    Great

    Thread Starter eligence

    (@eligence)

    I’ve noticed that this is throwing php notices every post as in super-socializer/inc/social_sharing.php the_champ_prepare_sharing_html() is declaring $post as global. In this use case $post = null. This can be fixed by adding

     if (NULL === $post) {
            $post = get_post($shareCountTransientId);
    } 

    on line 14.

    Thread Starter eligence

    (@eligence)

    This is throwing php notices every post as in super-socializer/inc/social_sharing.php the_champ_prepare_sharing_html() is declaring $post as global. In this use case $post = null. This can be fixed by adding

     if (NULL === $post) {
            $post = get_post($shareCountTransientId);
    } 

    on line 14.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Social Sharing Copy Link Not Working’ is closed to new replies.