Update 1.0.8 Problems

Viewing 15 posts - 1 through 15 (of 32 total)
  • #14719
    Fiddleback
    Participant

    Installed today’s update and ran in to several problems.

    Infinite Scroll no longer works, nor does enabling AJAX Links.

    Posts do not tile appropriately on the front page. What used to be a nice, close tiling now has everything scattered all over the front page with large, unsightly gaps between posts.

    http://gsa.thegamernation.org/

    #14720
    Diaggio
    Participant

    I was just typing the identical message, Fiddleback, but you put it so well:

    http://drowningbook.com/

    #14723
    jelo
    Participant

    Exactly the same problems on my site…

    #14724
    ciclotraveling
    Participant

    Hi guys, I have the same problem in my site: http://www.ciclotraveling.com and I don’t know what can I do.

    #14725
    ciclotraveling
    Participant

    Video posts don’t appear correctly in the front page. The video thumbnail is showed bigger than the post…

    #14726
    Myleene
    Participant

    Same problem here for me

    #14729
    kiwigirl
    Participant

    Same problems here.

    http://www.smilesandtears.org/

    #14732
    petkusj
    Participant

    In addition to the other problems reported, posts that have been designated display the video full width on the main page of the blog. My first three posts are video posts and now each video is overlapping the next.

    I appreciate the work in getting out the new theme, but I’m afraid these problems are vexing. Is the previous theme still available?

    Thanks,

    Jennifer Petkus

    #14741
    stephie
    Participant

    Same problems here. πŸ™

    #14742
    canardbleu
    Participant

    Same issues, rolling back to v1.0.7

    #14744
    cklosowski
    Participant

    I too am seeing these issues, it’s related to a missing JavaScript registration line:

    Devs, I fixed this by including a wp_register_script for your jquery-migrate script on line 589 of functions.php
    https://gist.github.com/cklosowski/5694193

    Both masonry and color box have a pre-requisite for it, but by not registering it, you’re not allowing those two javascript resources to load.

    #14746
    Fiddleback
    Participant

    Thank you cklosowski, that appears to have fixed all the issues I was seeing. Perhaps others would benefit from a slightly more detailed explanation of the fix, but I did manage to work out where it needed to go.

    Cheers!

    #14750
    cklosowski
    Participant

    @fiddleback,

    Great! Glad that worked, I’d be glad to give a little better description and detailed fix.

    The problem is caused by a dependency not being met. Masonry, Colorbox, and InfinateScroll are all jQuery plugins that require another jQuery plugin called jQuery Migrate. We can see that in their wp_register_script calls:

    wp_register_script( 'masonry', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'colorbox', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/colorbox.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'infinitescroll', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.infinitescroll.js', array( 'jquery-migrate' ), null );

    The part that mentions the ‘jquery-migrate’ tells WordPress to load these jQuery plugins only if/after the jQuery Migrate plugin has been loaded as they require it.

    If we look at the set of wp_register_scripts that version 1.0.8 is loading, you’ll notice that jquery-migrate is never being registered:

    function pinboard_register_scripts() {
    wp_register_script( 'ios-orientationchange-fix', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/ios-orientationchange-fix.js', false, null );
    wp_register_script( 'flexslider', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.flexslider-min.js', array( 'jquery' ), null );
    wp_register_script( 'masonry', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'colorbox', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/colorbox.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'fitvids', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/fitvids.js', array( 'jquery' ), null );
    wp_register_script( 'mediaelement', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/mediaelement.js', array( 'jquery' ), null );
    wp_register_script( 'mediaelementplayer', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/mediaelementplayer.js', array( 'mediaelement' ), null );
    wp_register_script( 'infinitescroll', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.infinitescroll.js', array( 'jquery-migrate' ), null );
    }

    The code later on is trying to load jquery-migrate with an enqueue script call but it’s never been registered, therefore it can’t be enqueued.

    The fix is to register jquery-migrate properly and that is done by adding the following code BETWEEN the registration of ‘ios-orientationchange-fix’ and ‘flexslider’:

    wp_register_script( 'jquery-migrate', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery-migrate.js', array( 'jquery' ), null );

    In the end the ‘pinboard_register_scripts’ function (starts at line 587 of functions.php) should look like the following:

    function pinboard_register_scripts() {
    wp_register_script( 'ios-orientationchange-fix', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/ios-orientationchange-fix.js', false, null );
    wp_register_script( 'jquery-migrate', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery-migrate.js', array( 'jquery' ), null );
    wp_register_script( 'flexslider', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.flexslider-min.js', array( 'jquery' ), null );
    wp_register_script( 'masonry', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'colorbox', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/colorbox.js', array( 'jquery-migrate' ), null );
    wp_register_script( 'fitvids', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/fitvids.js', array( 'jquery' ), null );
    wp_register_script( 'mediaelement', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/mediaelement.js', array( 'jquery' ), null );
    wp_register_script( 'mediaelementplayer', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/mediaelementplayer.js', array( 'mediaelement' ), null );
    wp_register_script( 'infinitescroll', get_template_directory_uri() . '//one-onedesigns1.netdna-ssl.com/scripts/jquery.infinitescroll.js', array( 'jquery-migrate' ), null );
    }
    endif;

    #14751
    Diaggio
    Participant

    Works here, MOZ, IE and CHROME.

    Thanks, cklosowski!

    #14752
    cklosowski
    Participant

    @Diaggio & @fiddleback,

    I’m glad this is working for you. I’m not one for Plugin/theme hacks though as they can be overwritten in future upgrades. My initial note for a fix was for the developers of the theme, to help them quickly resolve the issue.

    I’ve created a single use plugin to fix this. That way if Pinboard is updated (without this fix) then it won’t overwrite our fix. It also allows you to quickly deactivate it if they do include a fix in the next update.

    I’ve uploaded it to my website:
    http://www.kungfugrep.com/wp-content/uploads/2013/06/ck-pinboard-js-fix.zip

    Just download, and install via wp-admin.

    Cheers!

    Edit: you should delete the ‘fix’ mentioned in my previous replies before installing this plugin.

Viewing 15 posts - 1 through 15 (of 32 total)

You must be logged in to reply to this topic.