Thumbnails not showing on Network Theme Homepage

Hey Guys

So on my test site here: http://postfriendly.com/okhey/ you will see that thumbnails are showing 404 broken images rather than the featured image that is definitely set.

The blog posts in which are showing "Add image to post" are ones that I did not upload a featured image to them. Those images show up fine. I want to make it clear that I am using the settings to show "Blog Posts" from this site and NOT using "network posts"

I saw someone else having this issue but doesn't seem to resolve it: https://premium.wpmudev.org/forums/topic/network-theme-does-not-display-image-on-the-home-page

I am really wanting to use this particular theme but it is really imperative that I get the issue fixed so that user's featured image show up for each blog post. Thanks everyone

  • Mike Price
    • The Incredible Code Injector

    Oh this error might be helpful. I clicked on open image in new tab and get this:

    file not found okhey/wp-content/uploads/sites/19/2013/02/delitecaptaintaiwan8.jpg
    Query String : src=http://postfriendly.com/okhey/wp-content/uploads/sites/19/2013/02/delitecaptaintaiwan8.jpg&h=108&w=227&zc=1&multisite=false&blogdirid=19
    TimThumb version : 1.19

  • Mike Price
    • The Incredible Code Injector

    OK so it looks like the error says "multisite=false" which isn't true. It is a multisite sub directory set up. I wonder if because it says false it is looking then for the image in my sub directory which is not where the file is located. But why is it doing this?

    how can I tell it that it is indeed multisite and needs to look for the image elsewhere? Thanks !!

  • Mike Price
    • The Incredible Code Injector

    Thank you PC! it is driving me nuts..all other themes work with thumbnails so it is something wrong with the TimThumb script on Network theme in a multisite environment when trying to display "blog posts" and not "network" posts

  • PC
    • WPMU DEV Initiate

    Hiya,

    I just tested it on my lab site and used blog posts and set up featured images and it works fine without any issues.

    see it here : http://wpdemo.in/

    Can you please disable other plugins from the site, and try it out again ?

    Also, can you please let me know how have you set up a featured image ? Is that image appearing fine when you are editing the blog post in the backend ?

    Please advise.

    Cheers, PC

  • Mike Price
    • The Incredible Code Injector

    Hmm I was afraid you would say it would work. The featured image shows up fine in the backend of the post. It is not a plugin conflict im 99% sure. I am thinking it is something to do with TimThumb and maybe even my host (HostGator)

    The reason I don't think it is a plugin conflict is because the error makes it clear that the issue is TimThumb cannot locate the image file because for some unknown reason, TimThumb is trying to reference the image from the sub site uploads directory (which doesn't exist)

    The thumbnails are being stored on the main network site's upload directory but that is not where TimThumb is looking. Now, I notice in the PHP script it says something about creating a cache folder in blogs.dir. But it wasn't created. In fact, it is my fault it seems but I didn't have a blogs.dir folder at all in wp-content

    I went and created this directory and manually created the cache folder in it but that didn't seem to work either :slight_frown:

  • Mike Price
    • The Incredible Code Injector

    OH I would bet that you used network theme to test this out on the main network site? If so, could you try on a sub site with the network theme set to "blog posts" ? I think it is because this theme was primarily created for the main network site in mind.

  • Mike Price
    • The Incredible Code Injector

    OK still not working for me :slight_frown: It appears it is some type of issue with the fact that I did not have blogs.dir set up and manually creating that after the fact didn't help. Can we get the developer in here for this theme that might have a bit more knowledge of timthumb and why it is not finding my files? I would appreciate it ! Thanks so much!

  • Mike Price
    • The Incredible Code Injector

    So this might helpful to explain what I am referring to. Take a look at each of the different sources of our thumbnails via the URL

    My source:

    network/library/functions/timthumb.php?src=http://postfriendly.com/okhey/wp-content/uploads/sites/19/2013/02/delitecaptaintaiwan14.jpg

    Your Source:

    network/library/functions/timthumb.php?src=/blogs.dir/2/files/2013/02/new-user-in-list.png

    For some reason that I cannot figure out, your timthumb script is correctly fetching the image from Blogs.dir however mine is referencing a different source which is my uploads folder for this sub site.

    I need to know what to fix on my end to correctly alert timthumb to start looking in the proper place (ie. blogs.dir) Thanks!

  • Mike Price
    • The Incredible Code Injector

    OK, so I have done additional testing on an entirely different domain of mine. The thumbnails show perfectly fine for "Blog posts" on the MAIN network site. However, as soon as I try to do this on a sub site of the network, the broken images again appear.

    So this is not something wrong with my initial domain I shared with you because it is happening on other domains I own. I don't understand what could be causing the breaking of images on sub sites only. I really need this resolved.

  • Mike Price
    • The Incredible Code Injector

    Sorry, I know I am probably driving you guys crazy. But I found this: https://premium.wpmudev.org/forums/topic/blogsdir-is-empty-but-sites-folder-full which I didn't realize so my problem is not that images are not being stored because they are. They do show up in the sites folder

    But why does the timthumb php script in the network theme still reference the blogs.dir? Could this be causing my issue? IF so, why does this work for PC? thanks

  • PC
    • WPMU DEV Initiate

    Hiya,

    Greetings and thanks for the post(s)

    Sorry for the delay but that was unintentional. The reason was multiple posts as whenever you make a post the thread goes down to the bottom of my feed and I serve them serially.

    wow thanks for the non support and the theme that doesn't work right.

    Sorry but I don't think the same that the theme does not work right. Had the theme been faulty, it would not work on my site too.

    So, as its working fine for me but not for you. I would doubt that it might be a problem with your install somewhere.

    While I have tagged our lead developer on this issue, I will also suggest you to please try and test this out on the same host with a separate multisite install (if possible) so that we can ensure that the host is not blocking anything.

    Please note that developer response might take a while but I will be around with you and will keep a track of the request.

    Cheers, PC

  • Mike Price
    • The Incredible Code Injector

    Doesn't work :slight_frown: I read what the changes were and I think you may have misunderstood what im trying to do. I am on a child blog http://postfriendly.com/blogdirtest/ and trying to make a new post on that child blog.

    When I make a new blog post on the child blog the thumbnail image shows broken link. If I select it to show network posts it works fine. However, as soon as I select 'blog posts" and post a new blog post with thumbnail the image is broken

    This is the error message:

    file not found blogdirtest/wp-content/uploads/sites/20/2013/03/delitecaptaintaiwan5.jpg
    Query String : src=http://postfriendly.com/blogdirtest/wp-content/uploads/sites/20/2013/03/delitecaptaintaiwan5.jpg&h=108&w=227&zc=1&multisite=false&blogdirid=20
    TimThumb version : 1.19

  • EnzoMDD
    • Site Builder, Child of Zeus

    Hey @ThinkTaiwan,

    OK take two. I have updated again, try version 1.7.8 and let me know how it goes.

    It must of been a related but different bug I fixed before.

    The reason for your missing images is that multi site installs from WP version 3.5 use a different upload path, and the theme needed to be updated to work with this new path.

    Also see:

    http://codex.wordpress.org/Multisite_Network_Administration#Uploaded_File_Path

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.