Would you let us know the url of your webpage where this is happening so that we can check what’s wrong?
Thank you for you timely response. I am unable to do that as the site is not currently live.
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
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;
}
We will take care of this in upcoming releases.
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.
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.