The Coldfusion Open Source Forums
Home | ImageCFC | CFFM | BlogCFM | CFMBB | CFOpenMail / ImapCFC | CFOpenChat
Forums | Profile | Inbox | Members | Chat | Search | Login | RSS
Vivio Technologies Dedicated Hosting
New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page

Forums: CFFM: 'undefined' Alert Messages (CFFM 1.
Created on: 11/04/09 {ts '2013-05-18 12:24:00'} Views: 4568 Replies: 9
'undefined' Alert Messages (CFFM 1.31)
Posted Wednesday, November 4, 2009 at {ts '2013-05-18 12:24:00'}

First off, thanks to Rick for arguably the best CF-based file manager available!

I just set up 1.31 on a Win2003/IIS 6.0 running BlueDragon 7.1, and I'm getting weird errors when trying to move files, create directories, etc. - they all cause an alert box with the word 'undefined' in it, and when I refresh the page (via the refresh link CFFM provides), the operation usually is performed (deleting directories or files are an exception). I'm hoping it's just a configuration issue, and not some incompatibility with BD.

as for configuration, I've not changed anything and the CFFM and subdirectories exist in a directory at my webroot called 'assets', so I'm assuming the pathing is correct.

Any advice/help is appreciated.

RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 14:03:00'}

Is it a jquery alert box or a normal looking javascript alert?

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 14:09:00'}

Normal JS/browser style alert box

RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 14:18:00'}

I'd guess it's the result handler code from various jquery ajax events.. stuff like this:

function rh_deleteIt(data)
{
   if(data.ERRORMESSAGE!='') {
      alert(data.ERRORMESSAGE);
   } else {
      loadDirectoryListing();
   }
}

What browser are you using?

Have you tried multiple browsers?

I'd definately try Firefox with firebug installed .. have the net panel enabled so you can see how the server is responding to the ajax calls.

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 14:22:00'}

Tried on Chrome and Firefox - have Firebug on, and under the Response tab, this is what shows:

{errormessage:''}

This was when trying to create a directory - now, if I refresh the page, the directory I created shows up.

RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 15:41:00'}

Ah hah.

"errormessage" != "ERRORMESSAGE"

so, look in cffm.cfc and find this code:

<cffunction name="returnJSON" output="yes" returnType="void" access="public">
   <cfargument name="jsonObject" default="" required="no" type="Struct">
   <!---
      This actually only converts simple structs. I wanted
      it to work in CF7 so I couldn't use serializeJSON()
   --->

   <cfset var LOCAL = structNew()>
   <cfset LOCAL.output = "">
   <cfloop list="#structKeyList(jsonObject)#" index="LOCAL.key">
      <cfset LOCAL.output = listAppend(LOCAL.output, "#LOCAL.key#:'#jsStringFormat(arguments.jsonObject[LOCAL.key])#'")>
   </cfloop>
   <cfcontent type="application/json" reset="yes">
   <cfoutput>{#LOCAL.output#}</cfoutput>
   <cfabort>
</cffunction>


change this line:

<cfset LOCAL.output = listAppend(LOCAL.output, "#LOCAL.key#:'#jsStringFormat(arguments.jsonObject[LOCAL.key])#'")>


to

<cfset LOCAL.output = listAppend(LOCAL.output, "#ucase(LOCAL.key)#:'#jsStringFormat(arguments.jsonObject[LOCAL.key])#'")>

We have to manually ucase the key since aparently bluedragon doesn't uppercase struct keys automatically.

Rick

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 15:46:00'}

That fixed it! Thanks, Rick! I appreciate the time you've taken to help solve this, and hopefully it will be useful to other BlueDragon CF users in future!

RE: 'undefined' Alert Messages (CFFM 1.
Posted Thursday, November 5, 2009 at {ts '2013-05-18 20:42:00'}

You can thank me by filing it as a bug at http://cffm.riaforge.org =)

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www
RE: 'undefined' Alert Messages (CFFM 1.
Posted Friday, November 6, 2009 at {ts '2013-05-18 13:44:00'}

Done, and done - I've never submitted a bug to RIAForge before, so I hope I did it correctly with the right information.

RE: 'undefined' Alert Messages (CFFM 1.
Posted Sunday, November 8, 2009 at {ts '2013-05-18 08:42:00'}

thank you!

Rick Root
I'm not certified, but I have been told that I'm certifiable!

www

New Topic Reply Subscription Options   Previous Page  Page: 1   Previous Page
Subscription Options
Subscription options are available after you log in.

There are 10 active user sessions right now.