WordPress.org

Forums

Problem with js/thickbox/loadingAnimation.gif & GPU Usage (23 posts)

  1. AxYoung
    Member
    Posted 6 years ago #

    Hi everyone,

    Thank you in advance for reading this.

    I've had a lot of problems recently with unnecessary GPUs on my server (mediatemple). I took a look at the usage reports and the main culprit seems to be this file:

    wp-includes/js/thickbox/loadingAnimation.gif

    According to the server, the following files are missing and resultingly is causing unnecessary GPU.

    consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    consequenceofsound.net/2008/08/21/wp-includes/js/thickbox/loadingAnimation.gif

    consequenceofsound.net/2009/01/21/wp-includes/js/thickbox/loadingAnimation.gif

    consequenceofsound.net/2009/01/09/wp-includes/js/thickbox/loadingAnimation.gif

    And the list goes on. Does anyone have a suggestion as to how to fix this problem?

    I'd really appreciate it!

  2. AxYoung
    Member
    Posted 6 years ago #

    Sorry to bump, but still looking for a solution... :)

  3. AxYoung
    Member
    Posted 6 years ago #

    Again, sorry to bump, but upon further inspection, I've found that the file does exist:

    http://consequenceofsound.net/wp-includes/js/thickbox/loadingAnimation.gif

    It's just when it is included in a different link such as:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    or

    http://consequenceofsound.net/2008/08/21/wp-includes/js/thickbox/loadingAnimation.gif

    It doesn't work.

    Any suggestions? Please!

  4. frisco
    Member
    Posted 6 years ago #

    Did you open your thickbox.js and change the path to

    var tb_pathToImage =

    to where the image actually is?

    If you don't, thickbox.js probably can't find the image, even though it's on your server.

  5. AxYoung
    Member
    Posted 6 years ago #

    This is what the paths on my thickbox.js file are currently set to:

    var tb_pathToImage = "../wp-includes/js/thickbox/loadingAnimation.gif";
    var tb_closeImage = "../wp-includes/js/thickbox/tb-close.png";

    I'd assume those paths are correct, no?

  6. frisco
    Member
    Posted 6 years ago #

    I have my path for var tb_pathToImage set fully, as in:

    http://www.domain.com/wp-content/themes/images/loadingAnimation.gif

    I haven't checked my original TB download, but I'd guess that was the format used there.

    I don't have var tb_closeImage. What version of TB are you running?

  7. AxYoung
    Member
    Posted 6 years ago #

    Forgive me - I'm the farthest thing you can get from being technoligcally savvy with this - but what does TB mean?

    Also, to be clear the 'loadingAnimation.gif' does exist:

    http://consequenceofsound.net/wp-includes/js/thickbox/loadingAnimation.gif

    For whatever reason, it doesn't work when redirected/included in a url other than the main one:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    I'm sure I could be much clearer in this explanation, just don't know how else to explain it.

  8. AxYoung
    Member
    Posted 6 years ago #

    For reference, this is the answer I got from the hosting company:

    What this means is that whenever that script or code is attempting to pull that image up it is looking in the wrong paths, such as:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    but the image doesn't exist along that path it exists here:

    http://consequenceofsound.net/wp-includes/js/thickbox/loadingAnimation.gif

    Thus, you need to change your code so that the image is being looked for in the right location. Go to the pages where this file is being called up and find where in the source code for that page this animation image is being pulled up. Then change the code to pull from the correct location. It is very possible that this is part of a misconfiguration of your WordPress theme.

    Can anyone put this in laymans terms?

  9. AxYoung
    Member
    Posted 6 years ago #

    Or any idea where I should be looking to change this code?

  10. frisco
    Member
    Posted 6 years ago #

    I'll try. TB was just my short hand for Thick Box. Nothing too technical there.

    I'll guess that the "festival-outlook" part of your link is tied to your permalink structure. Your variable was a relative path because it included ../ My variable is an absolute path to the file location. Because you used a relative path which appears to be changing post-by-post based on your permalink structure, the file isn't being found since its own location isn't changing.

    I think if you simply change your variable to an absolute path that specifies exactly where the file is located, your problem will be solved. The absolute path won't change unless you change your folder structure or relocate your server. It's also handy to develop a sort of readme.txt for your site, where you document all of these settings. That way, if you update this file, at least you'll have a good clue as to why something breaks.

    Make sense?

  11. frisco
    Member
    Posted 6 years ago #

    The code to change is in your thickbox.js, approximately on line 8.

  12. AxYoung
    Member
    Posted 6 years ago #

    Thanks for the help.

    I changed the path from

    "../wp-includes/js/thickbox/loadingAnimation.gif";

    to

    "http://consequenceofsound.net/wp-includes/js/thickbox/loadingAnimation.gif";

    and I'm still getting an error:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    I assume I'm doing it right, but it's not working...

  13. AxYoung
    Member
    Posted 6 years ago #

    By the way, how would I know if the error was corrected? Would this link:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    appear the same as this:

    http://consequenceofsound.net/wp-includes/js/thickbox/loadingAnimation.gif

    Thanks! And again, sorry for the lack of knowledge! :)

  14. frisco
    Member
    Posted 6 years ago #

    Hmmm...you're doing it right (afik). I'll take a look at your site later this evening and post back what I find.

    Meantime, can you answer these questions:

    1) are you using ThickBox as a javascript file or a plugin that makes use of ThickBox?
    2) what is your permalink structure set to?
    3) what is the page or link that is calling the link you posted above?

  15. AxYoung
    Member
    Posted 6 years ago #

    Thanks. I'll try to answer the questions as best I can.

    1.) From what I can tell, there is thickbox.js file in my thickbock folder. I'm not sure if any of the plugins I use makes use of thickbox, but from looking at a page source, it looks like the e-commerce one might. That being said, this problem has been happening long before I started using this plugin.

    2.) The permalink is set to: Day and name http://consequenceofsound.net/2009/01/25/sample-post/

    3.) There are numerous pages calling the link. A few of note include:

    http://consequenceofsound.net/festival-outlook/wp-includes/js/thickbox/loadingAnimation.gif

    http://consequenceofsound.net/2008/08/21/wp-includes/js/thickbox/loadingAnimation.gif

    http://consequenceofsound.net/2009/01/21/wp-includes/js/thickbox/loadingAnimation.gif

    http://consequenceofsound.net/2009/01/09/wp-includes/js/thickbox/loadingAnimation.gif

    Thanks!

    If you'd like, you can email me at alexyoung@consequenceofsound.net

  16. AxYoung
    Member
    Posted 6 years ago #

    Just in case this helps find a solution, this is the answer I received from my server:

    You called today to inquire about resolving the 404 errors for the loadingAnimation.gif file paths listed in your GPU reports. I suggested searching the WordPress site to find a way to clear the site cache to remove broken links and checking the plug-in configuration for your site.

    Anything?

  17. frisco
    Member
    Posted 6 years ago #

    I took a quick look at your site, and here's what I see:

    It appears you're using TB (ThickBox) as a plugin, and it also appears that you have multiple instances of TB loaded.

    You have this one:

    <script type='text/javascript' src='http://consequenceofsound.net/wp-content/plugins/wp-shopping-cart/js/thickbox.js?ver=Instinct_e-commerce'></script>

    And then you have this one:

    <script type='text/javascript' src='http://consequenceofsound.net/wp-includes/js/thickbox/thickbox.js?ver=3.1'></script>

    I suspect that's not a good idea. I couldn't quickly find an image that clearly should have been loading with TB. I tried the images in the sidebar (Springsteen, etc) and they didn't load with TB, so it's not clear that TB is working. The 2 instances of it might be why.

    In my configuration, I'm loading TB not from a plugin, which simplifies things in a way. For you to sort this out, I'd try to eliminate 1 of the 2 TB instances, and then get in touch with the plugin author.

    To answer your last question, your link with festival-outlook in it is from a page with that name. You'll know it's working when it doesn't generate a bad link. The plugin isn't following the standard TB behavior; maybe there is another setting for the plugin? If you were using only the javascript TB (rather than a plugin), the fix you made would be done.

    Btw, here's a link to the forum of the original developer of TB:

    http://codylindley.com/thickboxforum/

    Since you aren't using TB by itself, they may just refer you back to the plugin author, but the folks there know a lot more about TB than I do.

    Good luck.

  18. chrishajer
    Member
    Posted 5 years ago #

    http://core.trac.wordpress.org/ticket/6453

    I think this is a problem in the thickbox.js that's included with WordPress

  19. dawning
    Member
    Posted 5 years ago #

    I did something stupidly hacky to deal with this.

    I was noticing that the file does exist at ​/wp-includes​/js​/thickbox​/loadingAnimation.gif

    But I was getting all sorts of requests for it for URLS like /<some page name>​/wp-includes​/js​/thickbox​/loadingAnimation.gif

    My "hack" to avoid dealing with it for now is I setup a regex with the Redirect Plugin.

    All it does is look for /(.*)/wp-includes/js/thickbox/loadingAnimation.gif
    and send any of those to /wp-includes/js/thickbox/loadingAnimation.gif

    Yeah, I know that's ugly, but for the moment, I'm happy with it.

  20. Roar
    Member
    Posted 5 years ago #

    ._.

    Does anyone know how much consequence this has on the server? We are dying over here from error hits on that dog.

    /wp-includes/js/thickbox/thickbox.css 37,248

  21. edwinkort
    Member
    Posted 5 years ago #

    I had it working with the redirection plugin, but now it's back again. Perhaps something in 2.8.5 did kill this.

    I'm not even sure what is calling that tickbox thingy in the first place. Can't remember installing a plugin using it.

  22. phbyerly
    Member
    Posted 5 years ago #

    Upgraded three blogs to Version 2.8.6. Got buried in 404 reports for

    /page/wp-includes/js/thickbox/loadingAnimation.gif
    and
    /xxxx/xx/xx/wp-includes/js/thickbox/loadingAnimation.gif

    So the system is now looking for the images in non-existent directories. I am guessing this is a change in how WP is is calling pages - might be a change not yet picked up by a plugin, but I don't think so.

    As suggested above, I have "fixed it" with Redirection 301 redirects:

    Source URL: /(\d*)/(\d*)/(\d*)/wp-includes/js/thickbox/loadingAnimation.gif
    Target URL: /wp-includes/js/thickbox/loadingAnimation.gif

    Source URL: /page/wp-includes/js/thickbox/loadingAnimation.gif
    Target URL: /wp-includes/js/thickbox/loadingAnimation.gif

    Paul

  23. joshbauguss
    Member
    Posted 5 years ago #

    another solution is to put this in your footer right above </body></html>

    <script type="text/javascript">
    tb_pathToImage = "/wp-includes/js/thickbox/loadingAnimation.gif";
    tb_closeImage = "/wp-includes/js/thickbox/tb-close.png";
    </script>

    this will avoid having to use cpu to do the rewrite method (which is a fine solution tho)

    The problem you are having is that wordpress's version of thickbox is being included. That version however is specifically coded for the admin side of the site. While it can be used easily for front end stuff, it has this nasty side effect.

    If you don't want to add that to your footer, just edit thickbox.js in wp-includes/js/thickbox. problem there tho is new versions of wordpress will overwrite your change. Best to just add this to footer.php of your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic