Support » Plugin: Jetpack by WordPress.com » Jetpack share button Email and Print not working (again)

  • Resolved aski71

    (@aski71)


    Hi,

    I’ve seen this posted before and tried to follow the hints in the previous threads but was not successful.

    I’m using the Pinboard theme 1.1.2 together with Jetpack 2.5. The Email and Print share buttons do not work. So I reverted to TwentyTwelve to see if it is the theme. Result: It IS the Pinboard theme.

    So I tried jQuery Updater Plugin: Did not solve the problem.

    So I tried to find locate where the functions are registered and found something in the functions.php:

    function pinboard_register_scripts() {
    	wp_register_script( 'ios-orientationchange-fix', get_template_directory_uri() . '/scripts/ios-orientationchange-fix.js', false, null );
    	wp_register_script( 'flexslider', get_template_directory_uri() . '/scripts/jquery.flexslider-min.js', array( 'jquery' ), null );
    	wp_register_script( 'imagesloaded', get_template_directory_uri() . '/scripts/imagesloaded.pkgd.js', array( 'jquery' ), null );
    	wp_register_script( 'masonry', get_template_directory_uri() . '/scripts/jquery.masonry.pkgd.js', array( 'jquery', 'imagesloaded' ), null );
    	wp_register_script( 'colorbox', get_template_directory_uri() . '/scripts/jquery.colorbox.js', array( 'jquery' ), null );
    	wp_register_script( 'fitvids', get_template_directory_uri() . '/scripts/fitvids.js', array( 'jquery' ), null );
    	wp_register_script( 'infinitescroll', get_template_directory_uri() . '/scripts/jquery.infinitescroll.js', array( 'jquery' ), null );
    }
    endif;
    
    add_action( 'init', 'pinboard_register_scripts' );
    
    if ( ! function_exists( 'pinboard_enqueue_scripts' ) ) :
    /**
     * Enqueue theme scripts
     *
     * @uses wp_enqueue_scripts() To enqueue scripts
     *
     * @since Pinboard 1.0
     */
    function pinboard_enqueue_scripts() {
    	wp_enqueue_script( 'ios-orientationchange-fix' );
    	wp_enqueue_script( 'jquery' );
    	wp_enqueue_script( 'jquery-migrate' );
    	wp_enqueue_script( 'flexslider' );
    	wp_enqueue_script( 'fitvids' );
    	wp_enqueue_script( 'wp-mediaelement' );

    Now I tried out various modifications also looking into:

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    But nothing worked and I do not really understand all the implications.

    Can anyone assist me in how to correct this within my theme?

    Thanks a lot!

    Cheers
    Alex

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor George Stephanis

    (@georgestephanis)

    Code Monkey

    It sounds like Pinboard is causing a javascript error on the page. Have you tried reaching out to Pinboard’s developer for support, as it seems to be the theme’s fault?

    I’ve tried but no luck so far. 🙁
    So you don’t think it’s related to the jQuery problem I found in all the other related posts?

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi aski, did you solve this? If not, mind giving me your site’s URL so I can take a look?

    Unfortunately no.
    The current workaround is that I reverted back to the old version of the theme that works.
    The site is: http://www.musoc.de
    If you want to have a look, I could install the new version again, but not today.

    Hi Richard,
    I updated the theme again.
    Can you please have a look what’s happening there?
    Thanks a lot for your help!

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I had a look at Pinboard and at your site. I saw the following js error:

    Uncaught TypeError: Object [object Object] has no method 'mediaelementplayer' on line 246

    Line 246 is the following:

    $('audio,video').mediaelementplayer({

    This is inserted by the theme. I tried to reproduce it on my site and wasn’t able to, however. Can you ask the theme author about that?

    Thanks.
    I posted this one to the Pinboard support forum and hope for a reply.

    Is that anyhow related to the Jetpack compatibility issue?
    This looks to me like a completely other area. 🙂

    Additional info:
    I had a quick look into the sources. There seem to be no differences between the version that worked (1.0.6) and the version I have upgraded to (1.1.2) around this area.
    So I guess this does not cause the problems?!

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Is that anyhow related to the Jetpack compatibility issue?

    I’m not what you mean by this, can you explain?

    There seem to be no differences between the version that worked (1.0.6) and the version I have upgraded to (1.1.2) around this area.

    Well, like I said, it works fine for me though, I wasn’t able to reproduce. Have you tried deactivating all your other plugins too (other than Jetpack), as a sanity check to see if it’s not a theme/plugin interaction?

    I meant the compatibility issue between Jetpack and my theme. Sorry for the confusion.

    Yes, I deactivated all other plugins one by one. Did not solve the issue.
    Which wordpress version have you tested it on? My provider has me on 3.5.2.

    Hi,

    thanks for pointing me into the right direction.
    I compared the functions.php of the new version to the old version and found that the following lines after line 593 were missing:

    wp_register_script( 'mediaelement', get_template_directory_uri() . '/scripts/mediaelement.js', array( 'jquery' ), null );
            wp_register_script( 'mediaelementplayer', get_template_directory_uri() . '/scripts/mediaelementplayer.js', array( 'mediaelement' ), null );

    Also in line 614 the line:

    wp_enqueue_script( 'wp-mediaelement' );

    had to be changed back to the former:

    wp_enqueue_script( 'mediaelementplayer' );

    Now also the Jetpack share buttons work fine again.
    Will feed this back to the theme’s developers.

    Thanks again!

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Yay, glad you found the problem!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Jetpack share button Email and Print not working (again)’ is closed to new replies.