Forum Replies Created
- Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236
cklosowski
MemberWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Good news All! Looks like version 1.0.9 corrected the jquery-migrate dependency that my plugin fixed. You can safely deactivate this plugin now.
I appreciate all your thanks, and thanks to the developers for getting the fix in this release!
Cheers!
AdvertismentDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236cklosowski
MemberWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220It looks like you have static links turned on so I can’t troubleshoot any issues you are seeing.
Provide a URL to the site and I can try and take a look.
I’m glad this plugin is working for so many people, I just with the developers at One Designs would actually release a fix for this so the plugin isn’t necessary.
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236cklosowski
MemberWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220I’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.zipJust download, and install via wp-admin.
Cheers!
Edit: you should delete the ‘fix’ mentioned in my previous replies before installing this plugin.
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236cklosowski
MemberWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Great! 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() . '/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
wp_register_script( 'colorbox', get_template_directory_uri() . '/scripts/colorbox.js', array( 'jquery-migrate' ), null );
wp_register_script( 'infinitescroll', get_template_directory_uri() . '/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() . '/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( 'masonry', get_template_directory_uri() . '/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
wp_register_script( 'colorbox', get_template_directory_uri() . '/scripts/colorbox.js', array( 'jquery-migrate' ), null );
wp_register_script( 'fitvids', get_template_directory_uri() . '/scripts/fitvids.js', array( 'jquery' ), null );
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 );
wp_register_script( 'infinitescroll', get_template_directory_uri() . '/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() . '/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() . '/scripts/ios-orientationchange-fix.js', false, null );
wp_register_script( 'jquery-migrate', get_template_directory_uri() . '/scripts/jquery-migrate.js', array( 'jquery' ), null );
wp_register_script( 'flexslider', get_template_directory_uri() . '/scripts/jquery.flexslider-min.js', array( 'jquery' ), null );
wp_register_script( 'masonry', get_template_directory_uri() . '/scripts/jquery.masonry.min.js', array( 'jquery-migrate' ), null );
wp_register_script( 'colorbox', get_template_directory_uri() . '/scripts/colorbox.js', array( 'jquery-migrate' ), null );
wp_register_script( 'fitvids', get_template_directory_uri() . '/scripts/fitvids.js', array( 'jquery' ), null );
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 );
wp_register_script( 'infinitescroll', get_template_directory_uri() . '/scripts/jquery.infinitescroll.js', array( 'jquery-migrate' ), null );
}
endif;
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236cklosowski
MemberWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220I 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/5694193Both 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.