We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36440
    • 87 Posts
    One other strange thing Ive noticed...when I click 'Files', the root folder in the files list is sometimes displayed as 'Media' instead of 'Filesystem'. In this case, if I then change the Media Source to my other one listed (Images), then change it back to Filesystem, the root folder reverts back to 'Filesystem'.
      • 3749
      • 24,544 Posts
      I would try creating a minimal template, with just DOCTYPE, html, head, body and content tags. Try assigning that template and see if the pages come up. If they do, you know something is wrong with your regular template or something it calls.


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36440
        • 87 Posts
        Thanks Bob, I think you might be on to something.

        I created a simple template and assigned it to 4 resources. Im clicking each of these resources repeatedly and so far so good.

        I also noticed that I have another template that is error free. Im still clicking over and over to be sure, but if this is the case then at least Ive narrowed it down to one template...
          • 36440
          • 87 Posts
          Well I've narrowed it down to 2 templates. What's consistent between them is the TV's and the calls to images. I have TV's that I use for a slider/carousel. There's TV's for each carousel so I can input a url, description, heading and image.
          I've removed the image TV from MODx and so far I am not getting the error anymore when calling these templates via resouces. What I dont get is WHY.

          MODx Error log shows numerous instances of the following:

          OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
          [2012-08-24 16:54:52] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: C:\inetpub\wwwroot\metawave\core\cache\phpthumb\phpThumb_cache_tempmetawave.meta-wave.com_srcaa15aca252ca654092b6f1fc4bf85442_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
          [2012-08-24 16:54:52] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
          OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
          [2012-08-24 16:54:53] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: C:\inetpub\wwwroot\metawave\core\cache\phpthumb\phpThumb_cache_tempmetawave.meta-wave.com_src64ae97386da48732bd22034e290b9741_paradf896d45f319fa323d889e84ccb98c5_dat0.jpeg
          [2012-08-24 16:54:53] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
          OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557



          What I don't get is...thumbnails are generated, just not consistently. Some display properly and some just display as 'empty boxes'. I dont think its permissions due to this inconsistency. If its PHP extensions, here is what I have enabled:

          extension=php_mysql.dll
          extension=php_mysqli.dll
          extension=php_mbstring.dll
          extension=php_gd2.dll
          extension=php_gettext.dll
          extension=php_curl.dll
          extension=php_exif.dll
          extension=php_xmlrpc.dll
          extension=php_openssl.dll
          extension=php_soap.dll
          extension=php_pdo_mysql.dll
          extension=php_pdo_sqlite.dll
          extension=php_imap.dll
          extension=php_tidy.dll
          extension=php_wincache.dll

          Can anyone share what I'm missing or overlooking? Im almost there!
            • 3749
            • 24,544 Posts
            You might need FreeType.

            Here's an abbreviated version of the code in the Captcha validator. You could put it in a snippet. I'm not sure if you need exactly these functions, but you it might give you some clues.

            I added gdimg_output.

            <?php
            $output = '';
            $fs = array('gdimg_output', 'imagettfbbox', 'imagecreate', 'imagecolorallocate', 'imagettftext',
                    'imagecolortransparent', 'imagedestroy', 'imagecreatefromjpeg', 'imagesx',
                    'imagesy', 'imagecreatetruecolor', 'imagecopyresampled', 'imagecopymerge'
                    );
            
            foreach($fs as $f) {
                        $output .= "\nChecking for"' . $f . ' function: ');
                        if (function_exists($f)) {
                            $output .= '  -- OK');
                        } else {
                            $$output  .= ' -- Not found');
                            $success =  false;
                        }
                    }
            return $output;



            Just a thought, the image file names are case sensitive, so if the files are named *.JPEG, that could be it. It could also be an issue with .jpeg versus .jpg.


            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 36440
              • 87 Posts
              All of my image extensions that I use are *.jpg. All lower case.
              Image names themselves are camelCased. Windows is case insensitive.

              Is Freetype a MODx requirement? Not listed in their Docs. Never even heard of it myself and not sure why it'd be neded from what Im reading about it.

              Sorry, not sure I should do with that snippet sad


              That error only seems to appear now when I access Files/images. I no longer have TV's doing so so no more errors when accessing resources. I do have a new error in PHP log:

              [25-Aug-2012 12:31:42 UTC] PHP Notice:  Undefined index: language in C:\inetpub\wwwroot\metawave\core\cache\includes\elements\modplugin\1.include.cache.php on line 61
              [25-Aug-2012 12:43:32 UTC] PHP Notice:  Undefined index: language in C:\inetpub\wwwroot\metawave\core\cache\includes\elements\modplugin\1.include.cache.php on line 61


              Where to look? I really appreciate your help so far Bob. if I can get this one thing solved I think Im good to go
              [ed. note: graves007 last edited this post 14 years, 1 month ago.]
                • 3749
                • 24,544 Posts
                FreeType is a font engine. Captcha needs it to render the images. I don't think MODX requires it, but it might. It's usually installed with GD, AFAIK.

                Which plugin has the ID of 1?

                Windows? Are you using IIS, XAMPP, or what?


                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 36440
                  • 87 Posts
                  I only have one plugin listed in MODx and it's TinyMCE. ID 1

                  Windows Server 2008, IIS7
                    • 3749
                    • 24,544 Posts
                    Ah. This is probably a question for the IIS gurus.

                    In the meantime, disabling the TinyMCE plugin might fix things. Do you have the current version of TinyMCE?

                    Uninstalling and removing all versions of TinyMCE, and then re-downloading and installing it could also be a solution.


                    ------------------------------------------------------------------------------------------
                    PLEASE, PLEASE specify the version of MODX you are using.
                    MODX info for everyone: http://bobsguides.com/modx.html
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 36440
                      • 87 Posts
                      TinyMCE is uninstalled.
                      No more TV's that allow modx users to insert images.

                      The only time I can conjure up the error now is firing up the MODx Browser. It starts creating thumbnails then it just stops and dies with the error.

                      If you look at attachment... I fire up MODx Browser, shortly after, that error pops up.

                      Also note 'Media' which I circled good and ugly like. No idea why it says Media. if I load my other Media Type, then go back to Filesystem, it will says Filesystem instead of Media.

                      UPDATE: In th emiddle of writing this I thought I'd change my PHP version, from 5.4 to 5.3, restarted IIS...no errors! Going to keep checkin this but so far it's good. I reinstalled TinyMCE 4.3.3 and re-created my TV's for my carousel...no issues there either. Im cautiously optimistic atm. Looks like a problem with PHP 5.4

                      I found only the following anomalies (thus far):

                      The 'Close' button on the MODx browser doesnt actually close the window. It only clears the contents of the window. Clicking the 'X' at upper right closes it. I can live with that. Although it closes properly if I call the MODx Browser from my TV.

                      Right Click>Delete on an image, or even trying to Delete the setup installer doesnt do anything. I get prompted, I OK, image is still there. I'll have to look into permissions there I guess.

                      Going to keep testing and poking around. Going to re-install WinCache next. Thanks again for all your help.

                      ...