We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    So I just upgraded my modx installation from .9.6.1 to .9.6.3 and everything is working well expect one thing, the captcha graphic only renders 75% of the time.

    Has anyone ever experienced something like this? or know how to fix it?



    ****FIXED*****

    Turns out there was a hidden file in the ttf directory that was causing this. Once I removed that file, it now renders 100% of the time.
      • 3749
      • 24,544 Posts
      Hmm . . . We had a fix for that in the captcha code. I guess it didn’t make it into the release.

      Here’s what I have for reading the font directory:

      while ($file = $dir->read()) {
      
              if(strstr($file,'.ttf') ) {  /* include only .ttf files */
      	$fontstmp[] = $this->dir_font.'/'.$file;
              }
      }
        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
        • 25663 MODX Staff
        • 12,272 Posts
        Make sure that gets logged as a patch please BobRay. Thanks!
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 3749
          • 24,544 Posts
          Quote from: rthrash at Feb 02, 2009, 10:04 AM

          Make sure that gets logged as a patch please BobRay. Thanks!

          I see it’s already there in SVN for the 9.6.3 release. I wonder why the OP doesn’t appear to have it?

          It’s in both rc1 and rc2 as well.


            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
            • 3232
            • 380 Posts
            What file would the code above be included in? I can take a look and see if it was in my package (which it might very well be.)

            The hidden file that was in the folder was ._ftb_____.ttf which could also be the problem since it does end in .ttf

              • 3749
              • 24,544 Posts
              Quote from: betoranaldi at Feb 02, 2009, 10:49 AM

              The hidden file that was in the folder was ._ftb_____.ttf which could also be the problem since it does end in .ttf

              Ah . . ., That would explain it. The code (in manager/includes/veriword.php just looks for files ending in .ttf.

              Any idea how you came to have a .ttf file that isn’t a font file in that directory?
                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
                • 3232
                • 380 Posts
                Yup, I know exactly how it happened...

                I downloaded the modx package and un-zipped it on my desktop. I manually updated the assets directory (one file/directory at a time so that I don’t overwrite custom stuff by accident) and I then created tar-balls of the manager and install directories, uploaded them to the server, deleting the old manager directory and un-archiving them.

                I use a Mac and it appears the software I used to create the tarballs, left these hidden files in the directories (which I assumed were created by OS X.)
                  • 3749
                  • 24,544 Posts
                  Interesting. Using FTP with WF_FTP leaves FTP log files all over the place, but they would never have a .ttf extension. I wonder if the extension is based on the directory name in your case. I also wonder if there’s an option to turn it off (I think there is in WS_FTP).


                    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
                    • 3232
                    • 380 Posts
                    Looking into this, it appears every file is having a hidden file created for it. so if you have the following:

                    include.php
                    veriword.php
                    font.ttf

                    I would also have the following in the same directories.

                    ._include.php
                    ._veriword.php
                    ._font.ttf

                    I am not really sure why this is happening.
                      • 3749
                      • 24,544 Posts
                      That seems odd. There really should be a way to turn it off. smiley
                        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