WordPress.org

Ready to get started?Download WordPress

Forums

Subdomain & Timthumb Issue (11 posts)

  1. Gutterflower
    Member
    Posted 8 months ago #

    Hi guys.
    I am having an issue with thumbnails on a multisite install and its driving me a little mad :S
    I know lots of people have issues with timthumb and multisites with domain mapping but I've been told this particular theme has been tested on multisite and there is not any special configuration required to make it work. It was also suggested that the issue could be something to do with the document_route set up.

    Ok so the site is set up at

    http://tpdb.shimmeringhorizons.com
    with
    http://thethemeparkdirectory.com
    domain mapped to it.

    Now my problem is as below. Take this page

    http://thethemeparkdirectory.com/item/paultons-park/

    The Thumbnail on the left doesn't work. By copying the URL of the image I get this error.

    http://i461.photobucket.com/albums/qq340/Gutterflower08/thumbnailerror1_zpsd434581c.jpg

    The image location mentioned in that error is correct at.

    http://tpdb.shimmeringhorizons.com/wp-content/uploads/sites/6/2013/08/Paultonslogo.jpg

    Buy it seems not to be contacting timthumb properly. I assume it is a hosting problem with the subdomain then? I use blue host and from what I can tell its set up how it should be using a wild card

    http://i461.photobucket.com/albums/qq340/Gutterflower08/subdomainwildcard_zps5d2b78fb.jpg

    I already have another site at
    http://vhcoasters.com domain mapped to http://vhcoasters.shimmeringhorizons.com without a problem.

    Am I missing something tiny here? I must admit I am fairly new to all this but I thought I had a handle on all of this until this issue.

    Thanks in advance for any advise.

    Cheers
    Dave

  2. http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/ is the best explanation of why this happens and how to fix it that I know of.

  3. Gutterflower
    Member
    Posted 8 months ago #

    Hi thanks for the reply.
    Much appreciate. Must be frustrating getting this question over and over again from new guys

    I've seen that page before and it didn't help I'm afraid. It actually knows where the image is. The image file in the error below is correct and its there. It has the right blog id and path.

    The website encountered an error while retrieving http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php?src=http%3A%2F%2Ftpdb.shimmeringhorizons.com%2Fwp-content%2Fuploads%2Fsites%2F6%2F2013%2F08%2FPaultonslogo.jpg&w=140&h=200. It may be down for maintenance or configured incorrectly.

    Here's a direct link to it
    http://tpdb.shimmeringhorizons.com/wp-content/uploads/sites/6/2013/08/Paultonslogo.jpg

    Placing the code from binarymoon into functions.php doesn't do anything no matter what blog id or path I put I still get the same error. something I noticed was that the code on binary moon seems to think images should be in the blogs-dir directory

    /wp-content/blogs.dir/’ . $blog_id . ‘/files/’ . $imageParts[1];

    Mine are not and are in the

    /wp-content/uploads/sites/’ . $blog_id . $imageParts[1];

    It seems to me to be the http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php address which is wrong not the image source.

    Its entirely possible I'm not understanding something fundamental here. Sorry if thats the case.

    Cheers
    Dave

  4. Well that doc was written back when everyone did have it in blogs.dir

    Yours would be /wp-content/uploads/sites/’ . $blog_id . $imageParts[1]; since you started WP on 3.5 or later. (Yes, it matters, I wish we had gotten it right from the start....)

    http://thethemeparkdirectory.com/wp-content/uploads/sites/6/2013/08/Paultonslogo.jpg works, so domain mapping is good.

    http://thethemeparkdirectory.com/wp-content/themes/directory/tn.php is the TimThumb file, and it's supposed to parse the image. What version of TimThumb does it claim to be? You can open it up in a file editor.

  5. Gutterflower
    Member
    Posted 8 months ago #

    It's version 2.8.11 according to the actual timthumb.php

    The tn.php actually just redirects to the timthum.php with this code

    <?php
    
    /*
    Just shortcut for timthumb.php
    In templates use macro {timthumb src => ..., w => ..., h => ...}
     */
    
    require_once dirname(__FILE__) . '/AIT/Framework/Libs/timthumb/timthumb.php';
  6. *MRPHF* WHHHHYYYYYY do people do that? *sigh*

    Well I have no idea why that theme is doing that. You're going to have to ask that theme dev what's up with this and if it's supported on Multisite. Some themes are just not written 'right' so they can't work on Multisite, due to the moved content dir. The plugins should use wp_upload_dir() to dynamically address the issue :/

  7. Gutterflower
    Member
    Posted 8 months ago #

    haha I have no idea why they do it.

    I have contacted the devs but their support is appalling. I'm lucky to get a response within a week. The last one being

    Theme is tested on multisite and there is not required any special configuration to make it work, we have tested classic configuration with sites on subdomain and subfolders, where timthumb have not problem access source images...
    On some servers was problem that there was not set up correct DOCUMENT_ROOT for each one of used domains. When timthumb get source images, use document root to get image correct way to image on server.

    Thanks, Ivan.

    Which wasn't much help I'm afraid. Still waiting for a response to my response to that.

    Oh well thanks for giving it a go. I'll keep trying fixes till one takes.

  8. Gutterflower
    Member
    Posted 8 months ago #

    grrr this is stupid. It DID work fine without Domain mapping. Now it doesn't.

    Just switched off domain mapping. this is the same page.

    http://tpdb.shimmeringhorizons.com/item/paultons-park/

  9. Paul Barthmaier
    Contributor Day Volunteer
    Posted 8 months ago #

    I had a subdirectory-based multisite that I inherited and had to upgrade a few times. Images were giving me hell. I started over with a fresh install, 3.5.2, but still had trouble. What finally helped me was specifying explicitly the file uploads path and the uploads url, as in: wp-content/blogs.dir/6/files and http://tpdb.shimmeringhorizons.com/files. Since you are using subdomains, and I'm interpreting your data, it may not be correct, but probably worth a shot.

  10. It DID work fine without Domain mapping. Now it doesn't.

    Well that's interesting... Did your server have any upgrades?

Reply

You must log in to post.

About this Topic