Featured Images Problem After Update
-
Tevko,
As soon as I updated to Version 2.0.1 I get this error message at the top of all of my Featured Images: Warning: Division by zero in /home/shapeshifter3/public_html/shapeshifter3.com/wp-content/plugins/ricg-responsive-images/wp-tevko-responsive-images.php on line 49.
Also, why is the plugin named twice in the code: ricg-responsive-images AND wp-tevko-responsive-images? Isn’t the second name the more updated GitHub version?
Lastly, Featured Images means something different in different themes. I always use them as links to an individual Video Post, and most of the time I don’t include them in the post itself. Many themes don’t allow that. This might need to be considered in you coding for Featured Images.
-
This is weird: the “Division by Zero Error” on .php Line 49 comes up with SOME of my Featured Images, and not others. Might be a conflict with other plugins I’m using. When I disable the plugin, the Error disappears.
I’m going to disable this plugin until the Feature Images issue is fixed.
Hi Shapeshifter,
Would you mind pasting in the code from your theme that is used to output the featured images?
Also, in the mean time, you can try pasting this into your functions.php file and that may fix the issue into the bug your experiencing is fixed.
add_filter( 'post_thumbnail_html', 'tevkori_filter_post_thumbnail_html', 0);^^ note that even though that line of code is wrapping to two lines, it should all be on one line.
Joe,
Thanks for your help!I’m using the Kelly Theme from Automattic.
I’m using the Child Theme Configurator plugin to create my Child Theme.
I’ve added this addition to my Content.php file to display my Featured Images and Excerpts in Main Blog and Search Results:
<?php if ( is_search() || is_home() || is_archive() ) : // Only display Excerpts for Search or Blog Index ?>The Child Theme Configurator plugin created this for me in my Child Theme’s Function.php file:
<?php // Exit if accessed directly if ( !defined('ABSPATH')) exit; // BEGIN ENQUEUE PARENT ACTION if (!function_exists('chld_thm_cfg_parent_css')): function chld_thm_cfg_parent_css() { wp_enqueue_style('chld_thm_cfg_parent', get_template_directory_uri() . '/style.css'); } endif; add_action('wp_enqueue_scripts', 'chld_thm_cfg_parent_css'); // END ENQUEUE PARENT ACTIONAnd I added your suggested filter code in the line below the word ACTION; but it crashed my system. Did I add it to the wrong location?
Joe,
I’m going to disable the plugin again to get rid of the Error messages until someone smarter than me figures out how to get this fixed (might be something I’m doing wrong).
It’s not something you’re doing wrong. There is a bug with the way featured images are being filtered. I’m working on a fix and will let you know as soon as it’s ready. Sorry for the inconvenience.
You don’t have to rush…I’ve got to get some sleep. I’ll look at this again tomorrow.
Thanks!
Joe,
I just updated to version 2.0.2, and my Error Messages have gone away. Your efforts seem to have paid off.
Thank You!
Thanks for confirming and sorry for the frustration.
The topic ‘Featured Images Problem After Update’ is closed to new replies.