5

I just upgraded from ColdFusion Builder 2 to ColdFusion Builder 3. Some of my code now generates the dreaded red x, suggesting that there is an error. I know there is not an error and I would like to adjust how the editor looks at the code. It seems to be attempting to parse some cfscript as xml.

Here's the red x's that show up seemingly randomly:

enter image description here

Here's the error that I see when I hover over the red x:

syntax error
illegally formed XML syntax
syntax error
missing ; before statement
illegally formed XML syntax

I've looked at every relevant preference and can't find a relevant option. I've looked all over the web trying to figure out what might be causing this. What might be causing this? Is this being parsed as XML by the editor?

UPDATE - 9/11/2014

The little red error x's seem to show up randomly, even on blank lines of code.

More errors

Evik James
  • 10,335
  • 18
  • 71
  • 122
  • What perspective are you using when viewing your CFML code? It's almost as if you're not using the CFML one? (disclosure: I have only used CFB3 fleetingly) – Adam Cameron Aug 07 '14 at 17:57
  • I am using the default perspective, which is ColdFusion. – Evik James Aug 07 '14 at 18:12
  • I'm pretty sure they are bugs in CFB3. Please report them to https://bugbase.adobe.com/ with your code snippet – Henry Aug 07 '14 at 19:23
  • Also make sure to post your bugbase ID (with a link) so we can vote for your bug to be fixed. – Dave L Dec 04 '14 at 22:04

3 Answers3

2

The random syntax error, with descriptions on hover same as OP, is a problem I've had and reported (as an add-on to an Adobe bug already reported, with more specifics). I'm running CFBuilder 3.0.0, Build 292922 according to the "About..." but opening the installation details shows 3.0.3.292922. I've added the MXUnit plugin, other than that, original default installation. I normally work in the Coldfusion or ColdFusion Debug perspective. When I tried editing the Preferences\General\Content Types, **I was surprised to find that I only had these: Java Class File

Text
Word Document**

Highlighting "Text" showed all the files I would normally associate with web development:

*.cfc (locked)
*.cfm (locked)
*.cfml (locked)
*.css (locked)
*.htm (locked)
*.html (locked)
etc.

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
Jay Dee
  • 63
  • 6
1

It looks like the cfscript tag is using the XML style. Use the following steps to unset it:

  • From the Window menu, select Preferences.
  • In the tree-view, select General > Content Types.
  • Expand XML in the top menu
  • Remove .cfm from the menu below.

XML Content Types File Associations

In addition, make sure the doctype is not XHTML and there are no xmlns attributes.

References

Community
  • 1
  • 1
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
  • I found the first three of your points easily. I couldn't make sensse of the fourth one though: "Change the xmlstyle property of the cfscript tag to false in the selected dictionary". Can you explain that? – Evik James Sep 11 '14 at 14:25
  • @EvikJames Sorry. The simple way is to go to ColdFusion > Profiles > Editor > Syntax Checking. Then deselect Enable Syntax Checking. – Paul Sweatte Sep 11 '14 at 15:40
  • Paul, I made the change you suggest. No help. The errors occur when not in CFSCRIPT. I added an image above. – Evik James Sep 11 '14 at 16:28
  • @EvikJames If this is a .cfm file, go to Window > Preferences > General > Content Types. Expand `XML` in the top menu, then remove .cfm from the menu below. I've added a screenshot above. – Paul Sweatte Sep 11 '14 at 19:11
1

CFBuilder is responding to the javascript in the cfm. In my case, I saw similar behavior even though the document where I was seeing the red "X"s simply had an "include". However, since I had tags inside the included template, the errors were appearing in the calling page. Either way, it's the script tags lacking a "type" attribute which is causing the red Xs to appear, and those red Xs bubble all the way up to any page including the template where the javascript occurs.

In my case, I added type="application/javascript"to the tag like so:

<script type="application/javascript" >

The red Xs then disappeared.

I hope that helps.

noogrub
  • 872
  • 2
  • 12
  • 20