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.
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;
}
}
-
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
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.
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
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?
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.)
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).
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.
That seems odd. There really should be a way to turn it off.