Ticket #650 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

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 martinkou) (diff)

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

comment:1 Changed 7 years ago by martinkou

  • Cc hkramer@… added
  • Reporter changed from martinkou 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 7 years ago by martinkou

  • Description modified (diff)

comment:3 Changed 7 years ago by alfonsoml

  • Component changed from General to Server : ColdFusion

comment:4 Changed 7 years ago by w.olchawa

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy