WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Jetpack Like button not working (38 posts)

  1. slash83
    Member
    Posted 1 year ago #

    Hey everyone,

    I have activated "likes" via Jetpack for my self-hosted wordpress site.

    Unfortunately, the button is greyed out and seems to be not loading at all.

    Any thoughts how I can get this up and running? This would be an example post:

    http://www.marcelmuench.de/2013/04/responsible-business-week/

    Thank you so much for your help!

    Marcel

    http://wordpress.org/extend/plugins/jetpack/

  2. quailrunphotos
    Member
    Posted 1 year ago #

    I am having the same issue with the likes button. It is grayed out and show "loading", but never changes.

    So any help would be appreciated.

    http://www.quailrunphoto.com

  3. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi slash83;

    I looked at your site, and it's not clear what the issue. is. Normally this is caused by a javascript error but I don't see any on your site. Can you try turning off all your other plugins and switching to the TwentyEleven theme to see if it's a plugin or them econflict? You can turn on your plugins one by one until you find the culprit. Once you find it, let me know and I'll see if it's something we can fix on our end.

    quailrunphotos:

    Your case is a bit easier. I had a look at your site, and your theme or one of your plugins seems to be loading an old version of jQuery instead of using the version that comes bundled with WordPress.

    It can create multiple conflicts with WordPress and with other plugins like Jetpack. You can read more about it here:
    http://wordpress.org/support/topic/troubleshooting-wordpress-35-master-list?replies=4#post-3547424

    Try switching to a different theme for a few minutes, and check if that solves the issue; if it does, you'll want to look for the function loading jQuery in your theme's header.php file, or in the functions.php file. Once you find that function, you can remove it and enqueue the proper version of jQuery as explained here:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    If the issue is not related to your theme, please try to disable all your plugins, one at a time, until you find the one that causes the conflict. You can then enqueue jQuery using the method I linked to above.

    If you do not feel comfortable editing PHP files, you can also contact the theme or plugin author and ask them to solve the issue.

  4. quailrunphotos
    Member
    Posted 1 year ago #

    Thank you. I disabled my theme and selected one of the wordpress default themes. The button works, I switched back to my original theme and the button stopped working.

    I have contacted the theme developer. Thanks for the help.

    David

  5. slash83
    Member
    Posted 1 year ago #

    Thanks a lot for your reply Richard. Really appreciate your efforts!

    Unfortunately the button still doesn't work if I disable all my plug-ins. It comes to live, if I switch to TwentyEleven theme but when I activate my current theme again the button stops working.

    It seems like it is an issue with my current theme then (a customised/modified WP Shower Portfolium theme).

    Marcel

  6. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi Slash,

    It seems you removed the Jetpack Like button, so I can't troubleshoot for you at the moment. I suspect that the issue is likely a javascript issue, however; it usually is with the Likes button.

  7. slash83
    Member
    Posted 1 year ago #

    Hey Richard,

    Thanks for staying tuned on this. Actually I have not removed the Jetpack Like button. I activated the plug-in again. When I visit my page it still shows the greyed-out button.

    Unfortunately I can only do front-end editing. What I know from customising the page is that I do load a few jquery scripts and a columnizer writter in javascript. I could hand over the original template files if that might help you.

    However I do understand if that might be too much effort for an individual problem.

    Thanks for your help anyway!

    Marcel

  8. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi Slash,

    Ok, I see the like button now, it wasn't there when I looked yesterday.

    So, I don't actually see any javascript errors, so I'm not quite sure what the issue is. Everything looks ok on the connection side of things, as well. Can you try steps 1 and 2 on this page:

    http://jetpack.me/troubleshooting/troubleshooting-tips/

    and let me know if you find the culprit, if any?

  9. JoyceD6
    Member
    Posted 1 year ago #

    I'm having the same problem and inadvertently posted to a "resolved" post. I don't know how to remove replies.

    Since I posted there (post copied below), I have deactivated all of my plugins one at a time until they were all deactivated and I still had the problems. I went to your Troubleshooting page and Known Issues and didn't see a list of themes that conflict.

    I'm looking forward to finding out when you have a fix. I also tried activating Twenty Eleven and that didn't help, so I reactived Mantra.

    The Like button appears to not be working on any page, though the proper ending tags appear.

    My 404 Monitor tells me that people have tried to use the button. The site is not linked yet, but Google has indexed it. It's a work in progress, but we'd like it to be operating correctly when it is finally linked and official. It's at daviesuu.org currently.

    Thanks for maintaining this plugin, which is overall very useful.

  10. JoyceD6? You'll get a more targeted response to your specific problem if you post your own topic instead.

    http://wordpress.org/support/plugin/jetpack#postform

    Adding your problem to someone else problem doesn't help then or you. You do want personalized support right? ;)

  11. JoyceD6
    Member
    Posted 1 year ago #

    Thanks! I had seen it done on other posts - people posting when they had the same problem. Sorry if this was improper. Wish I knew how to delete previous replies.

  12. slash83
    Member
    Posted 1 year ago #

    Richard,

    Thanks again. I did have a look at the troubleshooting.

    The like button works when I switch to other themes. I still can not get it to work with my current theme.

    I thought I might have messed up the code when I optimised the theme. However, I now also checked back with the original theme. I downloaded a fresh copy and activated it. It seems as it is a problem with the theme. You can have a look at the original theme here: http://wpshower.com/themes/portfolium/

    I think the theme is quite a bit different because of its portfolio structure. Which means it offers a portfolio page for photography, and a blog separately. This is resembled in the admin dashboard. If I like to create a new post I simply add a new post. However, if I like to create a new photo set, I will have to do this via a tab called "portfolio", which seems to be a separate functional element of the theme.

    My guess is that this unique structure could be a problem for the jetpack plug-in. Most other functions (apart from the wordpress likes) seem to be working though.

    In the theme's support forums I couldn't find a discussion related to Jetpack. Any thoughts, Richard?

    Thanks!

    Marcel

  13. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    @Marcel Could you please start your own thread, as per the Forum Welcome?
    http://wordpress.org/support/plugin/jetpack#postform

    It could also help if you could let us know your site URL, so we can have a look at the problem? If you want your site URL to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    Thank you!

  14. slash83
    Member
    Posted 1 year ago #

    Sorry Jeremy, if you scroll to the first post you will see, that I started this post and that an example of my page can be found at: http://www.marcelmuench.de/2013/04/responsible-business-week/ (as stated in my very first post).

  15. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    My bad. Sorry about that.

    Could you go to Posts > All Posts in your dashboard, open that post in the post editor, and just click the "Update" button? Does this change anything?

    Thanks!

  16. slash83
    Member
    Posted 1 year ago #

    No worries. Appreciate your help!

    Unfortunately that doesn't help either. As I mentioned it works if I switch to another theme. It does not work with the original WPShower Portfolium theme as well as with my customised Portfolium theme.

    Have you got any thoughts on the assumptions in my post today (6 hours ago). Thanks

  17. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I noticed a Javascript error, caused by a call to the now deprecated Twitter API v1. Does the Portfolium theme include some kind of Twitter widget? If so, could you try to disable it, and let me know if it helps?

  18. slash83
    Member
    Posted 1 year ago #

    Thanks Jeremey,

    the Twitter widget is something which I added to my customised version of the theme.

    The original WPShower Portfolium theme does not include a Twitter (or other) widget. As mentioned before, even if I go back to this original theme, the Jetpack like button is not loading.

  19. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for the additional details.

    Another Javascript error seems to be caused by the jQuery Cycle library added by your theme to all pages. The error only appears on single posts, where the Like button is displayed and where you probably don't need this library.

    Could you try to locate the function that is loaded this library into your theme, and make sure it's not executed on article pages. You can do so by wrapping the function in a !is_single() conditional tag, like so:

    if( !is_single() ) {
    /* Call to the jQuery Cycle library */
    }

    Let me know if it helps.

  20. slash83
    Member
    Posted 1 year ago #

    Thanks Jeremy!

    I looked at my code and cleaned it up a bit. It was a bit messy indeed. However, I did not manage to work in your suggestion - it would break my jQuery gallery, but this might be a problem of my limited coding skills.

    Here is my header.php which calls the jQuery libraries.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" dir="<?php bloginfo('text_direction'); ?>" xml:lang="<?php bloginfo('language'); ?>">
        <head>
    
    <!-- in --!>
    
    	<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"><![endif]-->
        <!--[if IE 6]>
            <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie6.css" type="text/css" media="screen" />
        <![endif]-->
        <!--[if IE 7]>
            <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie7.css" type="text/css" media="screen" />
        <![endif]-->
        <!--[if IE 8]>
            <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie8.css" type="text/css" media="screen" />
        <![endif]-->
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
     	<?php wp_head(); ?>
    
        <script src="<?php bloginfo('template_url'); ?>/js/columnizer.js" type="text/javascript"></script>
        <script src="<?php bloginfo('template_url'); ?>/js/columnize.js" type="text/javascript"></script>
    	<script type='text/javascript' src='<?php bloginfo('template_url'); ?>/js/menu.js'></script>
    
    <!-- out --!>
    
    <style type="text/css">
    #images { height: 300px; width: 900px; padding:0; margin:0; overflow: hidden;}
    #images img { border:none;}
    </style>
    
            <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
            <title><?php
                global $page, $paged;
                wp_title('|', true, 'right');
    
                $site_description = get_bloginfo('description', 'display');
                if ( $site_description && ( is_home() || is_front_page()))
                    echo " | $site_description";
                if ($paged >= 2 || $page >= 2)
                    echo ' | ' . sprintf( __('Page %s'), max($paged, $page));
    
                ?></title>
    
            <meta http-equiv="Content-language" content="<?php bloginfo('language'); ?>" />
            <link rel="profile" href="http://gmpg.org/xfn/11" />
    	<link href="http://www.marcelmuench.de/favicon.ico" rel="shortcut icon" />
            <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
            <!--[if IE]><link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_url'); ?>/ie.css" /><![endif]-->
            <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
            <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
            <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>"/>
            <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    
    <?php
    			wp_enqueue_script('jquery');
    
    			if ( is_singular() ) wp_enqueue_script('slideshow', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', 'jquery', false);
    			wp_enqueue_script('lazyload', get_template_directory_uri() . '/js/jquery.lazyload.mini.js', 'jquery', false);
    			wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', 'jquery', false);
    		?>
            <?php wp_head(); ?>
            <?php if ( is_singular() ) : ?>
                <script type="text/javascript">
                    jQuery(document).ready(function() {
                        jQuery('#show').after('<div id="show_nav">').cycle({
                            fx:     'fade',
                            speed:  500,
                            next: '#show',
                            timeout: 0,
                            pager:  '#show_nav'
                        });
                    });
                </script>
    	<?php endif; ?>
    
        </head>
        <body>
            <div class="wrapper">
                <div class="header clear">
                    <h1 class="logo"><a href="<?php bloginfo('home'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>" /></a>
    </h1>
                    <?php wp_nav_menu(array('menu' => 'Header', 'theme_location' => 'Header', 'depth' => 2, 'container' => false, 'menu_class' => 'nav jsddm', 'walker' => new extended_walker())); ?>
                </div>
                <div class="middle clear">

    When I put the !is_single() conditional tag instead of 'if ( is_singular() )' the jQuery gallery stopped working. How to do it correctly?

    Thanks!

  21. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Should there be a slideshow on your article pages? I do not see any at the moment, nor in Firefox nor in Chrome.

    This code seems to indicate that the slideshow should only appear on article pages.

    The code I proposed does actually remove the slideshow code from the article pages, because I didn't think it would be necessary there since I didn't see any slideshow on these pages. It also creates a javascript error that may be what's causing the issue with Likes.

  22. slash83
    Member
    Posted 1 year ago #

    You're right, there is no need for a gallery in the articles pages!

    I left the code (as pasted in here) unchanged, since otherwise it breaks the galleries of the portfolio pages. I also find it confusing that the code should indicate that the slideshow only appears on article pages, whereas the opposite is the case. However, I can't fully get a grasp of how the developer built the theme.

  23. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could you point me to one of the pages that includes a slideshow?

    Thanks!

  24. slash83
    Member
    Posted 1 year ago #

    http://www.marcelmuench.de/portfolio/myanmar/

    This and any other picture gallery that you can find from the main page http://www.marcelmuench.de/

    Thanks!

  25. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    These galleries are on Pages, not on Posts, am I correct?

    If that's the case, could you try to change is_singular by is_page in the code loading that library?

  26. slash83
    Member
    Posted 1 year ago #

    Thanks Jeremy,

    I did that. Unfortunately, it brakes my photo galleries, the jQuery Cycle doesn't work anymore.

    Firebug: "TypeError: jQuery(...).after(...).cycle is not a function

    pager: '#show_nav'"

    It also doesn't make the like button work. Still greyed out and "loading".

    I am not sure how the template is built, never saw this portfolio option in another template before. Therefore I am not sure if it is a page or a post or something different.

    In the jetpack option I see the following options:

    "Show buttons on

    Front Page, Archive Pages, and Search Results
    Posts
    Pages
    Media
    Portfolio"

    Could this mean that "Portfolio" is something completely different than a post or page?

  27. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Could this mean that "Portfolio" is something completely different than a post or page?

    That's exactly it! Your Portfolio items use a Custom Post Type. You probably have a "Portfolio" menu in your dashboard, under Posts and Pages.

    In this case, you will have to target that Custom Post Type. Try replacing is_singular by is_singular( 'portfolio' ) (assuming the Custom Post Type name is "Portfolio".

  28. slash83
    Member
    Posted 1 year ago #

    Thanks, my code now looks like this:

    <?php
    			wp_enqueue_script('jquery');
    
    			if ( is_singular( 'portfolio' ) ) wp_enqueue_script('slideshow', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', 'jquery', false);
    			wp_enqueue_script('lazyload', get_template_directory_uri() . '/js/jquery.lazyload.mini.js', 'jquery', false);
    			wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', 'jquery', false);
    		?>
            <?php wp_head(); ?>
            <?php if ( is_singular( 'portfolio' ) ) : ?>
                <script type="text/javascript">
                    jQuery(document).ready(function() {
                        jQuery('#show').after('<div id="show_nav">').cycle({
                            fx:     'fade',
                            speed:  500,
                            next: '#show',
                            timeout: 0,
                            pager:  '#show_nav'
                        });
                    });
                </script>
    	<?php endif; ?>

    GOOD NEWS: My gallery is still working! Thanks!

    BAD NEWS: The jetpack button is still stuck "loading.."

    I also disabled the twitter json call for the moment, so now there is no error on my page when I use Firebug. Not sure how to get the like button to work though..

  29. slash83
    Member
    Posted 1 year ago #

    just to let you know: I did another round of disabling Jetpack, disabling all plug-ins, changing back to the twenty-twelve theme. Re-enabled Jetpack. (Like button worked). Changed to my current theme (Button stopped working). Re-enabled all plug-ins. Status quo: Button doesn't load.

  30. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Thanks for bearing with me.

    Re-enabled Jetpack. (Like button worked). Changed to my current theme (Button stopped working)

    Something else in your theme must be conflicting with the Likes.

    Could you try to disable the lazyload jQuery plugin that's added to your header, and let me know if it helps?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic