Support » Plugin: Recent Posts Slider » [Plugin: Recent Posts Slider] broken images FIXED

  • I have found the bug in version 0.6.3 of the Recent Posts Slider. For my WordPress installation (in a subdomain), the following worked. YRMV.

    Around lines 459 and 471 (same code appears twice, replace both instances!), look for this original code:

    $rps_img_src_path = "/".$post_details[$p]['post_first_img']['0'];

    Replace with:

    $rps_img_src_path = $post_details[$p]['post_first_img']['0']; // NOTE: removed leading slash

    To find this bug, I simply looked at the generated source from my browser and saw that the image paths from the plugin’s widget was giving me paths that looked like this:

    <img src="//wp-content/uploads/2012/05/image-239x246.jpg" align="left" />

    That preceding slash was obviously killing the path.

    http://wordpress.org/extend/plugins/recent-posts-slider/

Viewing 15 replies - 1 through 15 (of 26 total)
  • Electrolund,

    I’m not so sure it’s fixed. I tried the fix, but still having issues, one thumbnail is not the featured image for the post. Here it is in my development area. I have not tried it on my live site yet, but I will, it might work there, the problem seems to shift from site to site, in other words, sometimes it will show the wrong thumbs, or not at all, it seems random.

    It’s great you are trying to correct the plugin, thanks!

    T.

    Nope…. not fixed, I tried it on my site, The Biker’s Garage, and it would only show one thumbnail for a post made in April, nothing on the others. I had to return it to just using the excerpts. I wish this were better news for you. Could the post date upload folders have anything to do with the problem? I have my media set to keep all the images separated by months, I did not want files of the same name overwriting previous post images.

    T.

    Hmm. Thanks for the feedback, Odinkinder. But just so I understand your situation:

    1) Were the images not working at all until my fix was applied?
    2) Can you send me the outputted source of your live site (Biker’s Garage), with the plugin patched? I’d like to look at the HTML.

    What you have brought up sounds like other bugs in the plugin. I’m not sure why it would be harvesting the wrong images or only selective images. That’s odd.

    I have made the settings on my live site to show both thumbnails and excerpts. So now the settings are the same on my development site and live site, but they do not have the same problem, so yes, there may be more bugs to find! Thanks for working on this, I am glad someone is trying to fix it, perhaps if you make enough changes, you can make a new plugin based on this one as the author of RPS seems to have abandoned it.

    T.

    So your live site now has four recent posts, only the last of which has an image showing. Is this the only post of those four with a featured image set?

    On the dev site, I see that the first two posts have the same image showing as the featured image, though the second post doesn’t have that image in the body of the post.

    Just off the cuff, you realize that this plugin only pulls featured images, correct? It’s not designed to pull attached images (i.e., inserted into the body of the post), although that would be cool! Future feature? 😉

    *** UPDATE ***
    My statement above is not correct. I tested on a post that has no featured image set, but only two attached images (see test site here). The plugin is infact grabbing that image and using for the slider (see slide #5).

    Seems to be working fine on my site. Hmm.

    Slight update. I have also encountered the problem with the plugin pulls the wrong image on some posts. But in my case, it was if a post has an unattached image link in the body — perhaps an off-site URL linked image?

    Somehow this scrambles the plugin and it must be finding the next available attached image (which is in another adjacent post) instead.

    Make sure that the posts have their images attached properly.

    i am using this plugin… and its not grabbing any photos at all

    see here: http://bridestobe.ca/vancouver/

    i am using it on a multisite subdirectory

    @samijones, I don’t see it running on that link. Did you try applying the patch that I recommended above?

    Hello Electro,

    This plugin is supposed to use the featured image, each of my posts have featured images. And, all the posts have attached images, there is nothing off-site. I have returned my live site to excerpt only, sorry, I can not have my site looking broken in any way. I went to your demo site and could not find the slider in use, where was it again?

    T.

    Odin, it’s only enabled on my test site index page:
    http://cbe.electrolund.com/

    A thought – email me your Recent Posts Slider plugin file. I’ll have a look…

    I see it, and it’s working for you apparently, or is it still getting the wrong images?

    Terry

    No, I checked and it’s pulling the right images per post.

    Hi, electro.
    where should I change that code?

    @ szelesmuhely, did you read my first post above? I mention the line number there. What errors are you getting?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘[Plugin: Recent Posts Slider] broken images FIXED’ is closed to new replies.