WordPress.org

Ready to get started?Download WordPress

Forums

Recent Posts Slider
broken images FIXED (27 posts)

  1. electrolund
    Member
    Posted 2 years ago #

    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/

  2. Odinkinder
    Member
    Posted 2 years ago #

    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.

  3. Odinkinder
    Member
    Posted 2 years ago #

    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.

  4. electrolund
    Member
    Posted 2 years ago #

    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.

  5. Odinkinder
    Member
    Posted 2 years ago #

    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.

  6. electrolund
    Member
    Posted 2 years ago #

    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? ;)

  7. electrolund
    Member
    Posted 2 years ago #

    *** 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.

  8. electrolund
    Member
    Posted 2 years ago #

    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.

  9. samijones
    Member
    Posted 2 years ago #

    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

  10. electrolund
    Member
    Posted 2 years ago #

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

  11. Odinkinder
    Member
    Posted 2 years ago #

    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.

  12. electrolund
    Member
    Posted 2 years ago #

    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...

  13. Odinkinder
    Member
    Posted 2 years ago #

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

    Terry

  14. electrolund
    Member
    Posted 2 years ago #

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

  15. szelesmuhely
    Member
    Posted 1 year ago #

    Hi, electro.
    where should I change that code?

  16. electrolund
    Member
    Posted 1 year ago #

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

  17. szelesmuhely
    Member
    Posted 1 year ago #

    yeah I already rode it. But I don't know where to override it.
    Anyway here's my site: szelesmuhely.org

  18. szelesmuhely
    Member
    Posted 1 year ago #

    Solved: It didn't show the post's image..just if I set a featured image

  19. electrolund
    Member
    Posted 1 year ago #

    Glad to hear it, szelesmuhely. Strange though -- in my tests, the plugin has pulled an attached image on posts that have no featured image.

  20. Odinkinder
    Member
    Posted 1 year ago #

    Hey Electro, why don't you make a new plugin based on this one? It's apparently been abandoned by the author. There seems to be some inconsistency in the way it works, I could never get it to work for me on one site, on another, it works fine. If you are going to put any work into this plugin to correct the issues it has, you should get paid, so you should have your own plugin.

    Terry Cavender
    [ Signature moderated. ]

  21. mfk
    Member
    Posted 1 year ago #

    hi,

    this is kind of strange. i downloaded and installed the plugin. everything works but the image doesnt show. i checked my codes and i couldnt find :

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

    instead, i found that they were already mended

    $rps_img_src_path = $post_details[$p]['post_first_img']['0'];

    but still the image doesnt show. just the the slider with the bg.

    also its on a subdomain. if that helps. would love to show the link here but unfortunately i dont think i can do that

  22. electrolund
    Member
    Posted 1 year ago #

    @fariskassim, do what I did. Check the HTML output on your blog. See what it’s doing. Test the anchor link (see my first post above).

    Is that link broken — probably is. Maybe you need that preceeding slash after all?

    @Odinkinder, maybe I should do that one of these days. It’s a nice plugin, but seems to have some bugs related to servers. Behaves differently on some installs.

  23. ch21
    Member
    Posted 1 year ago #

    Hi, electrolund.

    I have same problem which is about showing images. I only get excerps not images which is set featured image Can you help me with this issue? Or can you send me the right version of recent post slider.php file?

    Thanks advance,

    Here's my site: http://dby.comule.com/DBY/

  24. mfk
    Member
    Posted 1 year ago #

    haha thanks for the reply.

    but it somehow works now and i got it figured out. seems like it'll only pull featured images that are uploaded to the media section of wordpress.

    initially i was using an url of an image hosted somewhere else.

    cheers.

  25. TossGenius
    Member
    Posted 1 year ago #

    Nice post. I got this running on my tech site :D
    Daily Technology News - iPhone 5, Android, Gadgets

  26. steponafish
    Member
    Posted 1 year ago #

    I am running into the same problem. I have made the necessary changes from the first post and I have fixed another problem with the slider (Alt text was different), but the images still do not show up.

    I am using a multisite, if that helps. I checked the source code, amd the image path doesn't even show up. So I know its in the php file not recognizing the image file somewhere.

    The image file is not located under "uploads/2012/12...." it is located under "blogs.dir/BLOG_ID/files/2012/12/...." If that helps too.

    Here's the site, I'm working on. weekly.stlukesblogs.org/

  27. electrolund
    Member
    Posted 1 year ago #

    @steponafish, sorry for the LONG delayed reply. Looks like you switched to Orbit Slider? How do you like it?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.