Intro slider breaks for subdomains

resolved (16 posts) (5 voices)

  1. Strategerizer
    Member

    Slider on the home page for the following site does not display:
    http://lucia.neagu.com

    I set the slider to show the following image:
    http://lucia.neagu.com/files/2011/04/Hard-Beat.jpg

    I understand that TimThumb script breaks if provided images from a different domain. But as you can see I am providing images from the same domain and subdomain. I think the issue may have to do with the fact that the website displays at a subdomain (lucia.neagu.com) rather than just a domain (neagu.com). But I am not sure if this is really the cause, and even less clear what the fix would be.

    Please advise.

    Posted 1 year ago #
  2. Ruderic
    Support

    Hi,

    Timthumb is working in the other pages of the website, right?

    Could you please take a look at this topics?

    http://mysitemyway.com/support/topic/timthumb-workaround-curious-why#post-217
    http://mysitemyway.com/support/topic/slider-will-not-display-images-at-all#post-10998

    Posted 1 year ago #
  3. Strategerizer
    Member

    Ruderic, I have looked into both topics but still the issue remains.

    I have the same thumb.php script as related in the first topic. Did a file compare and it is identical. Replaced it anyway but issue remained.

    I set permissions to 777, as related in second topic and issue remained. I now have set it back to 755 for cache folder and 644 for thumb.php file, as it was before. I was able to verify that permissions is not the culprit because I use the Awake theme (modified a bit with the theme name "Komotion", so not to confuse the two, on another blog, part of the same WP installation). The resizing script works fine there, with permissions set for 755/644.

    None of the resizing images work on http://lucia.neagu.com (you can see one set for a blog post too).

    What are next steps to do?

    Thanks!

    Posted 1 year ago #
  4. Hi Strategerizer,
    if you PM me the login access to both the wordpress admin and the FTP, I'll take a look into it.

    Posted 1 year ago #
  5. Strategerizer
    Member

    Raspo, just sent you PM with login info.

    Thanks!

    Posted 1 year ago #
  6. Strategerizer
    Member

    Feel free to mess around with any of the other sites listed below, if helpful to debug, since I get inconsistent behavior:

    Supersite is http://komotion.com - TimThumb appears to be working.
    One of several subsites is http://neagu.com - TimThumb NOT working.
    Another of several subsites is http://lucia.neagu.com - TimThumb NOT working.
    Another subsite is http://test3.komotion.com - TimThumb appears to be working.

    My hunch is that it has something to do with subsites that have their own custom domain name. This may be the reason why my main supersite is working (komotion.com) as well as any subsites generated as subdomains there BUT subsites on their own custom domains fail (as is the case with neagu.com and lucia.neagu.com).

    Thanks.

    Posted 1 year ago #
  7. Hi Strategerizer,
    I checked your WPMU and I noticed that the site url of lucia.neagu.com is registered as lucianeagu.komotion.com. I've never worked with a wordpress setup so huge and maybe this is the right way to do it.

    Anyway, the images on the slider that aren't working, have an url like this:
    http://lucia.neagu.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://lucia.neagu.com/wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg&w=900&h=350&zc=1&q=100
    but, if I try and change it like this (replacing lucia.neagu.com with lucianeagu.komotion.com):
    http://lucianeagu.komotion.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://lucianeagu.komotion.com/wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg&w=900&h=350&zc=1&q=100
    it does work.
    This means that Timthumb is working (the permissions are right) and it should not be an issue with hostgator. It's probably something related with the Wordpress setup or the htaccess.

    As I said, I've no experience with anything like this, so I'm going to flag this post for Webtreats and we should hear a reply shortly.

    Posted 1 year ago #
  8. Elliott
    Support

    Hello Strategerizer,

    I'm not sure why it would be doing that either so I'll go ahead and leave it flagged for Webtreats to take a look.

    I remember you were having problems with this before, http://mysitemyway.com/support/topic/help-timthumb-wordpress-30-multisite-issue-persists

    One way to get past the domain restriction is to use relative url's instead of absolute like so,

    Absolute: http://lucia.neagu.com/wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg
    Relative: /wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg

    I'm not sure if this will work in your case or with wordpress network but you can try it out in the meantime.

    Posted 1 year ago #
  9. Strategerizer
    Member

    Elliott - I tried using relative URLs (good idea) but it is not working either.

    Raspo - Interesting finding, though I am not sure how I can use that in determining a solution. How/where were you able to verify this by replacing thre URL?

    I'll wait on Webtreats then...

    Thanks.

    Posted 1 year ago #
  10. Strategerizer
    Member

    I have not heard from Webtreats yet. Is there any workaround you think I can use in the interim? As you can see at http://lucia.neagu.com, it is an eye sore smack on the main front page... As mentioned above, using relative paths does not work. Let me know if you have any other suggestion and when would I be able to hear back from Webtreats. Thank you!

    Posted 1 year ago #
  11. Strategerizer
    Member

    Have not heard back from Webtreats yet...

    Posted 1 year ago #
  12. Webtreats
    Support

    Hi Strategerizer,

    We'll be looking into this shortly for you and will post back here with what we find out.

    Posted 1 year ago #
  13. Webtreats
    Support

    Hi Strategerizer,

    Your Wordpress MU install was getting confused with the mapping for the following two domains:

    http://neagu.com
    http://lucia.neagu.com

    As a result both sites were redirecting to 404 pages when it encountered a image resizing url path to Timthumb.

    I added the following to Line #322 in wp-content/themes/awake/lib/functions/theme-functions.php

    $img_url = str_replace( home_url(), 'http://komotion.com', $img_url );

    And now Timthumb is working on both domains.

    Posted 1 year ago #
  14. Strategerizer
    Member

    Thank you!!

    Is then something wrong then with my WP MU installation? I just followed the directions on how to use a Domain Mapping plugin to redirect a domain name to a subsite... Should I change anything else?

    Also, I am not sure I understand what the added code does... should I expect any other side effects? (do you mind telling me what the added code is meant to do?)

    Thanks again.

    Posted 1 year ago #
  15. Webtreats
    Support

    Hi Strategerizer,

    There is nothing wrong with your WP MU installation, it just didn't know how to handle the rewrite for the image link to Timthumb. The fix I implemented above just replace the following two domain names:

    http://neagu.com
    http://lucia.neagu.com

    With:

    http://komotion.com

    For instance this link:

    http://lucia.neagu.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://lucia.neagu.com/wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg&w=900&h=350&zc=1&q=100

    now becomes:

    http://komotion.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://komotion.com/wp-content/blogs.dir/36/files/2011/04/Hard-Beat.jpg&w=900&h=350&zc=1&q=100

    Your WP MU installation knows how to handle the 2nd link.

    There won't be any side effects with this fix unless you change the main domain on your WordPress MU install from http://komotion.com

    You'd then have to adjust the code above to reflect your new domain:

    $img_url = str_replace( home_url(), 'http://your-new-url.com', $img_url );
    Posted 1 year ago #
  16. Strategerizer
    Member

    Thanks for the clarification. Works great.

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme