Opened 18 years ago

Closed 17 years ago

#650 closed Bug (fixed)

ColdFusion 'config' Struct Attributes Not Parsed Correctly

Reported by: topodian@… Owned by:
Priority: Normal Milestone:
Component: Server : ColdFusion Version:
Keywords: SF Cc: hkramer@…

Description (last modified by Martin Kou)

Ran into a few bugs with the ColdFusion code that parsed the config struct.

  1. In fckeditor.cfm, the ampersand isn't inserted

between name="value" statements for the hidden config form field.

Its a simple fix:

sConfig = sConfig & "&" & HTMLEditFormat(
fieldName ) & '=' & HTMLEditFormat( fieldValue );
  1. Again in fckeditor.cfm, the isBoolean() test to

convert "yes/no" to "true/false" will also convert a value such as "649" to "true". For example the "ImageBrowserWindowWidth" was being set to "true" for me.

Again a simple fix:

if( isBoolean(fieldValue) and NOT isNumeric(fieldValue)
and fieldValue ) fieldValue = "true";
else if( isBoolean( fieldValue) and NOT isNumeric
(fieldValue) ) fieldValue = "false";

Basically I just added "AND NOT isNumeric(fieldValue)".


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1159115&group_id=75348&atid=543653

Change History (4)

comment:1 Changed 18 years ago by Martin Kou

Cc: hkramer@… added
Reporter: changed from Martin Kou to topodian@…

It might be better to simply have a list of which are the boolean parameters so that parameters that should not be treated as boolean like "DefaultLanguage" aren't.

Entering "yes"/"no" for boolean types is valid CFML so asking ColdFusion users to NOT enter boolean values as "yes/no" is unpractical.


Moved from SF. Original poster: topodian

The matching for boolean values didn't work correctly for all purposes. E.g. DefaultLanguage="no" means "norway". I removed this subfunction in both fckeditor.cfc and fckeditor.cfm. Please use the new files attached (RC3).

Please use always true/false or 1/0 values for boolean parameters, not yes/no.


Moved from SF. Original poster: hkramer

comment:2 Changed 18 years ago by Martin Kou

Description: modified (diff)

comment:3 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Component: GeneralServer : ColdFusion

comment:4 Changed 17 years ago by Wojciech Olchawa

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy