• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

code changes spontaneously upon opening the file in dreamweaver, swaps code to different order

Community Beginner ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

At first I thought it was me, but after several years of this happening through several different versions of Dreamweaver, I think I'm ready to officially call this a bug, and a really weird one.  In certain long, complicated files consisting of a mix of html and coldfusion tags, I've found that consistantly, every time I open the file, there is a </cfloop> and a </cfoutput> tag that spontaneously switch places.  The correct order is <cfoutput><cfloop>code here</cfloop></cfoutput> but when I open the page, before I even edit anything, dreamweaver has swapped it to <cfoutput><cfloop>code here</cfoutput></cfloop> which then throws an error if I save the page and don't notice and fix the change. There are many other cfoutput/cfloop combos on this same page, so I don't know why the ones around line 644 have developed this maddening habit, and I don't know if there is a fix, but I just wanted to put this out there in case someone else is wondering if they're going bonkers when experiencing the same thing.  It's happened to me on a few different files, but one in particular I edit fairly frequently and so I was able to really stop and see if it was somehow user error, and nope, definitely not me. No other parts of the code seem to be changing, but I guess I wouldn't necessarily know if the change wasn't causing errors. Screen shots below. I am using Dreamweaver 21.3, 15593 build on Windows 10 Enterprise 22h2, but past versions have behaved the same way.

 

crazy-glitch.jpg

Bug Unresolved
TOPICS
Product issue

Views

132

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
5 Comments
Community Expert ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

I can't speak to unsupported CF as I don't use it.  But my PHP code doesn't get swapped around unless there are HTML code errors present.

 

Have you validated Live Code to ensure it's valid?

View > Live Code.

Window > Results > Validation.  Check current document.

 

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

I did some digging into CF documentation and actually nested in either order is correct. This has me leaning to Nancy's response that there there might be a minor code issue somewhere causing an unclosed statement which has DW confused and trying to auto close things in what it perceives to be the correct order. Can you validate whether the previous loops and outputs are closed prior to this one?

Votes

Translate

Translate

Report

Report
Community Beginner ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

CF is very similar to php in that I'm outputting html in loops, and with includes and functions, so it is entirely possible that I've made some minor error html tag error, or one that dreamweaver perceives to be an error because it doesn't understand the structure of the html being generated by the scripting language.  I will look into that.  Even so, it seems like a bug to me just "fix" tagging errors it percieves rather than just alerting the end user to them.   Thanks for the idea!

Votes

Translate

Translate

Report

Report
Community Beginner ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

You can nest cfoutputs inside cfloops, or the other way around, but if you open an output, then open a loop, the next thing has to be closing a loop, before you close the output, or an error will be generated.  I will try to dig into those 600 lines of codes previous to try to see if there is some other tag issue that's not generating error messages, but is causing Dreamweaver to hiccup.

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

LATEST

Remember, Dreamweaver is not CF intuitive. 

DW's supported script types are shown below.

 

image.png

Adobe dropped CF support from DW in 2016.  They've since created a ColdFusion extension for Visual Studio Code.

https://helpx.adobe.com/coldfusion/coldfusion-builder-extension-for-visual-studio-code/get-started-c...

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report