Support » Plugin: Related Posts Thumbnails Plugin for WordPress » [Plugin: Related Posts Thumbnails] Bug in Newest release of the plugin

  • There is a bug which has been existent in this plugin, I had manually edited the plugin file and I realized it again when I upgraded to the latest version of the plugin as my changes were gone. The bug is related with how the path to images is formed when “custom fields” are used.

    In my theme I specify post thumbnails (absolute image path) in a custom field, and I configured your plugin similarly. My wordpress is installed in a subfolder so the path to my installation is not but The plugin takes the “Default image URL” correctly. But when trying to get the custom field URLs it manipulates the URL and make an image URL look like (stripping “sam” from the URL breaks the URLs).

    if ( $thsource == 'custom-field' ) {
    				$debug .= 'Using custom field;';
    				$url = $basic_url = get_post_meta( $post->ID, get_option( 'relpoststh_customfield', $this->custom_field ), true );
    //I commented the problematic lines
    				//if (strpos($url, '/wp-content') !== false)
    				//	$url = substr($url, strpos($url, '/wp-content'));
    				$theme_resize_url = get_option( 'relpoststh_theme_resize_url', '' );
    				if ( !empty( $theme_resize_url ) )
    					$url = $theme_resize_url . '?src=' . $url . '&w=' . $width . '&h=' . $height . '&zc=1&q=90';

    Hope this is corrected in the plugin soon.

  • The topic ‘[Plugin: Related Posts Thumbnails] Bug in Newest release of the plugin’ is closed to new replies.