Awake 2.2 - TimThumb stopped working in Fancy Images and Image Frames

resolved (11 posts) (2 voices)

  1. Strategerizer
    Member

    I am stumped by this...

    Have just changed a website from a subdomain http://formotus.komotion.com to it's own domain name at http://www.formotus.com and it broke the images placed using shortcodes. The WP images are fine. Looking at the code I can see the original referenced image URL resolves fine but not in the image path that goes through TimThumb...

    Any ideas??

    Here is a test page:
    http://www.formotus.com/tests/

    You can see the image is broken but clicking on it it brings up the original just fine. It is only the TimThumb resizing that seems to fail. I though it may have something to do with the change in domain (I know TimThumb is sensistive about images not residing on same domain) but everything I checked seems to be fine. Maybe there is a cached (still linked to the previous subdomain structure) that would need to be cleared??

    You can see the image code is:

    <span class="noscript">
    <img class="hover_fade_js"
    src="http://www.formotus.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://www.formotus.com/wp-content/blogs.dir/42/files/2011/10/avatar.png&w=100&h=100&zc=1&q=100"
    title="" alt="" width="100" height="100">
    </span>

    The shortcode I used for it is:

    [fancy_images width="100" height="100"]
    [image]http://www.formotus.com/files/2011/10/avatar.png[/image]
    [/fancy_images]

    The image exists in that location at:
    http://www.formotus.com/wp-content/blogs.dir/42/files/2011/10/avatar.png

    But somehow it fails to be displayed when going through TimThumb...
    http://www.formotus.com/wp-content/themes/awake/lib/scripts/thumb.php?src=http://www.formotus.com/wp-content/blogs.dir/42/files/2011/10/avatar.png&w=100&h=100&zc=1&q=100

    Any ideas what is going on?

    Thanks!

    Posted 7 months ago #
  2. Elliott
    Support

    Hello Strategerizer,

    I would create a backup and update Awake to version 2.3. The timthumb resize script was found to have a vulnerability and a lot of Wordpress sites were getting hacked until they released a new version, http://timthumb.googlecode.com/svn/trunk/timthumb.php.

    Go ahead and send us a private message with a link to your site and a Wordpress / FTP login and we'll take a closer look.

    Posted 7 months ago #
  3. Strategerizer
    Member

    Elliott,

    I have updated to Awake 2.3 and the issue is there as before. As a side note, if you wonder how come the homepage slideshow is working, it is because I made it at the exact size so likely TimThumb does not need to resize it.

    I just PM-ed you with login info.

    Posted 7 months ago #
  4. Strategerizer
    Member

    Also, if it matters, the website is using a child theme of Awake so I do not lose customization when updating. However, I just tested the parent Awake theme and it shows same problem...

    Posted 7 months ago #
  5. Strategerizer
    Member

    Hi Elliott, any news on this before the week's end? The website is still showing broken images. If you can give me an update, that would be great.

    Thanks!

    Posted 7 months ago #
  6. Elliott
    Support

    I'm having FTP problems, replied to your PM.

    Posted 7 months ago #
  7. Strategerizer
    Member

    Elliott, so I understand the Devs will take a look at this.

    EDIT: took out the other issue I noticed at the bottom of the blog post pages... it was probably triggered by our prodding at it.

    Posted 7 months ago #
  8. Strategerizer
    Member

    Would you let the Dev know the login info or should I PM them directly? (if so, to which account?)

    Thanks.

    Posted 7 months ago #
  9. Elliott
    Support

    They informed me that the issue was fixed by changing lines 365 - 367 in /lib/functions/image.php from this,

    elseif( ( mysite_get_setting( 'image_resize_type' ) == 'timthumb' ) && ( !$image_resize[0] ) && ( mysite_is_cache_writable() ) && ( $image_info[0] != $width || $image_info[1] != $height ) )
    
        $image = THEME_URI . '/lib/scripts/thumb.php?src=' . mysite_wpmu_image( $src ) . '&w=' . $width . '&h=' . $height . '&zc=1&q=100';

    To this,

    elseif( ( mysite_get_setting( 'image_resize_type' ) == 'timthumb' ) && ( !$image_resize[0] ) && ( mysite_is_cache_writable() ) && ( $image_info[0] != $width || $image_info[1] != $height ) ) {
    
        $image = THEME_URI . '/lib/scripts/thumb.php?src=' . mysite_wpmu_image( $src ) . '&w=' . $width . '&h=' . $height . '&zc=1&q=100';
    
        if( is_multisite() ) {
            $curSite =  get_current_site(1);
            $main_url = 'http://' . $curSite->domain;
            $current_url = get_bloginfo('wpurl');
            $image = str_replace( $current_url, $main_url, $image );
        }
    
    }
    Posted 7 months ago #
  10. Strategerizer
    Member

    Wonderful! Works like a charm again - thank you!

    (Slight correction for anyone needing to replicate this: Code changed seems to actually be on line approx.185.)

    Shall I safely assume this fix will be folded into the core code and available in the next release or should I place it in the child theme in order for the edit to persist when I upgrade?

    Thanks again.

    Posted 7 months ago #
  11. Elliott
    Support

    If it works in your child theme then I would leave it there.

    Posted 7 months 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