Modal Popup with Chrome 32

I recently ran into an issue where modal popups just stopped working in chrome, but no other browser.  It turns out to be an issue with chromium version 32 which upgraded their internal flash player (PepperFlash) to version 12 (12.0.0.44 specifically).  This introduced a bug where the modal overlay would show up but the actual modal component would not display.  

After a couple days of working on this, I found that the issue resides in PopUpManagerImpl.as (used in PopUpManager).  So, when you called something like PopUpManager.addPopup( myComponent ); it would run a bunch of logic in PopUpManagerImpl.as to actually do the work.

Multi-threaded Actionscript

Finally!  It's been a long time coming but the actionscript VM is finally multi-threaded as of FlashPlayer 11.4 and AIR 3.4.  The basics of the "threading" is the use of Workers within the VM.  The main SWF can instantiate any number of workers which run in a separate instance of the VM, thus pushing them to the background.  I just finished watching a couple videos on the subject at gotoAndLearn.com.  I highly recommend checking them out for a basic setup of Workers.  

First, here is some info from the AS3 references on Workers:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Worker.html

Here are the videos setting up a project for this:


Additionally, FlashBuilder 4.7 has been upgarded to handle workers very nicely.  Here is a video demonstrating that:

 

MangoBlog post next/previous links

 

MangoBlog is a really nice system out of the box.  However, I finally came across a need that I couldn't find built-in.  A client wanted to have a next/previous link from each post.  Mango does this already for what I call the "Multiple Post" views such as the default view, category view, search view, etc.  It's a little bit of pagination built in.  However, none of this is there by default on the post.cfm page.  

I knew exactly how to do this, but I couldn't find a "Mango" way to do it.  For example, how do I find out what the blog tablePrefix is and what the datasource is.  I will be installing this blog in a multi-site environment soon with all blogs running from the same admin so I definitely needed to figure this out.  

Here's a basic flow of what I did:  

 

FileZilla Issues

I use FileZilla's FTP Client for work and it works great.  CF Webtools also uses the FileZilla server for some of their FTP servers.  We ran into an issue lately where when attempting to connect to a FileZilla server using a FileZilla client, the connection succeeds but will not list out any directory contents.  The fix, as it turns out, is to force UTF-8 charset for the connection.  

Here's a great post by ColdFusion Muse on the subject and details for the fix.

Farcry 6 webtop security override for richtext editor

I ran into a unique situation where I needed to load the tinyMCE richtext editor outside the webtop in a Farcry 6 site.  I was developing a forum script where users who logged in (but did not have webtop admin permissions) were able to post simple forum messages.  The code for that looked like this:

<ft:form>
    <ft:object objectid="" typename="tfMessage" lfields="title,message" lhiddenFields="" legend="Forum Message" />
   
    <ft:farcryButtonPanel>
        <ft:button value="Save" color="orange" />
        <ft:button value="Cancel" validate="false" />
    </ft:farcryButtonPanel>
</ft:form>

The "message" field was the one in question.  Whenever I was logged into the forum as a user with webtop permissions, the rich text editor loaded up just fine.  However, when using a user that did not have webtop permissions, it failed again and again.  I eventually tracked the code down to a file being called (/webtop/thirdparty/tiny_mce/tiny_mce_gzip.cfm) which loads up gzipped .js files needed for the editor.  Even attempting to call this file triggered webtop security and a redirect to the login page, so rather than loading a script as was expected, it was loading up the login page via an ajax call and the editor errored out, leaving just the textarea. 

My fix is undocumented in farcry and may not be the best fix for the situation but was the only one I could come up with for this.  The webtop's Application.cfc file sets up a request scope and then checks security.  Before checking security it ends up calling the projects _serverSpecificRequestScope.cfm file.  So, here's the fix:

In /webtop/Application.cfc, add these lines to the OnRequestStart method toward the top:

<!--- Param override security to false --->        
<cfset request.fc.overrideWebtopSecurity = false />

Then, change the following line (26 in my file):

<cfif not findNoCase( "login.cfm", cgi.script_name )>

To this:

<cfif not findNoCase( "login.cfm", cgi.script_name ) AND NOT request.fc.overrideWebtopSecurity>

By default this will do nothing.  However, this gives you the ability to override webtop security for certain files as needed.  In _serverSpecificRequestScope.cfm, add the following lines:

<cfif FindNoCase("tiny_mce_gzip.cfm",CGI.script_name)>
    <cfset request.fc.overridewebtopsecurity = true />   
</cfif>

Now you have overridden the security in the webtop for this single file, allowing the richtext editor to be displayed outside the webtop.  I emailed the farcry-dev list asking that this be included in a future version.  Not sure if that will happen or not but I'm hopeful.