tracker issue : CF-3870997

select a category, or use search below
(searches all categories and all time range)
Title:

DDX not working when CHF3 applied

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Reto Aeberli / Reto Aeberli (Reto Aeberli)

Created: 12/12/2014

Components: Document Management, PDF generation

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 1

Problem Description:
DDX is not working anymore when CHF 3 applied

Steps to Reproduce:
<cfsavecontent variable="ddx"><?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/_coldfusion_ddx.xsd">
	<PDF result="output1">
	<PDF source="doc1" />
	<PDF source="doc2" />
	</PDF>
</DDX></cfsavecontent>
<cfoutput>#isDDX(trim(ddx))#</cfoutput>

Actual Result:
No

Expected Result:
YES

Any Workarounds:
Uninstall CHF3 (not really an option as CHF3 includes an important security hotfix)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3870997

External Customer Info:
External Company:  
External Customer Name: Reto CENTINATED GmbH
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

+1 - isDDX("file.ddx") also fails for valid DDX, altho <cfpdf action="processddx" ddxfile="#ddx#"..> still processes the DDX regardless.
Vote by External U.
9464 | December 12, 2014 09:27:10 AM GMT
xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/_coldfusion_ddx.xsd" used in the DDX is not correct . You need to use the following in the DDX instead:- xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd" ISDDX() will work fine .
Comment by Suchika S.
9443 | December 12, 2014 10:18:21 AM GMT
Hi Reto, Here is the repro I'd created before seeing your ticket here. Not sure if anyone of it is restricted in Standard: <cfhtmltopdf destination="#expandPath('./pdfIn.pdf')#" overwrite="true" pagetype="custom" pagewidth="2" pageheight="2"><cfoutput>#now()#</cfoutput></cfhtmltopdf> <cfsavecontent variable="myDDX"> <?xml version="1.0" encoding="UTF-8"?> <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="pdfOut"> <PageSize width="2in" height="2in" scaleUp="true" /> <PDF source="pdfIn" /> </PDF> </DDX> </cfsavecontent> <cfset fileWrite(expandPath('./myDDX.ddx'), myDDX) /> <!---<cfif isDDX(myDDX)>---> <!---<cfif isDDX("myDDX.ddx")>---> <cfpdf action="processddx" ddxfile="#myDDX#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./pdfOut.pdf')}#" name="myDDXResult" /> <!---</cfif>---> <!---</cfif>---> When I uncomment either <cfif>, then the pdfOut.pdf isn't created in CF11 Update 3 Enterprise Standalone. However, there is no issue at all in CF11 Final Developer Standalone. Thanks!, -Aaron
Comment by External U.
9444 | December 12, 2014 10:21:43 AM GMT
Hi Aron, The support for some DDX elements is restricted for the standard edition. You can refer the following doc to know about the DDX elements that are allowed in Enterprise and restricted for Standard : https://wikidocs.adobe.com/wiki/display/coldfusionen/cfpdf
Comment by Suchika S.
9445 | December 12, 2014 10:28:18 AM GMT
Hi Suchika, Yes, I was using xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd" Both of the isDDX() in my previous post return true in CF11 Final Enterprise Standalone (11,0,0,289822), but return false in CF11 Update 3 Enterprise Standalone (11,0,03,292480). x64 Windows w/ Java 1.7.0_51. Thanks!, -Aaron
Comment by External U.
9446 | December 12, 2014 10:31:08 AM GMT
Hi Suchika, I am using Enterprise Edition. CF11 Final (works) vs CF11 Update 3 (fails). Thanks!, -Aaron
Comment by External U.
9447 | December 12, 2014 10:32:05 AM GMT
@Suchika Singh You could be right, but does not change the fact that CHF3 breaks working code. I had on my production code no xsi attribute and took the example above from the official adobe documentation.
Comment by External U.
9448 | December 12, 2014 10:33:27 AM GMT
Hi Aaron, I will check on the Enterprise Edition for the DDX you have provided and will let you know . Thanks, Suchika
Comment by Suchika S.
9449 | December 12, 2014 10:35:20 AM GMT
Hi Suchika, Very cool, thanks! -Aaron
Comment by External U.
9450 | December 12, 2014 10:36:24 AM GMT
We are on Enterprise too. My DDX above is from the version 8 of the document "Using DDX to perform advanced tasks". The same snippet from the current document available at https://wikidocs.adobe.com/wiki/display/coldfusionen/Using+DDX+to+perform+advanced+tasks with the space in the xsi is not working too. @Suchika Did you test that it works for you with the space instead of the underscore?
Comment by External U.
9451 | December 12, 2014 10:41:30 AM GMT
Hi Reto, I tested with the space and not a underscore .It worked fine for me. Can you send us the ddx that you use in your production code so that we can investigate further and know what the issue is? Thanks, Suchika
Comment by Suchika S.
9452 | December 12, 2014 11:04:22 AM GMT
Meanwhile I have a testserver up with CHF3. It seems that CHF3 is more restrictive about the xsi Attribute. Testurl: http://195.137.172.241/ddx/ Exact same testfile on a server with CHF2 is working fine for all tests.
Comment by External U.
9453 | December 12, 2014 11:06:45 AM GMT
@Suchika, you can find my test cases at http://195.137.172.241/ddx/
Comment by External U.
9454 | December 12, 2014 11:11:07 AM GMT
@Reto, Thanks for your code. Will check on it and let you know.
Comment by Suchika S.
9455 | December 12, 2014 11:14:33 AM GMT
With http://195.137.172.241/ddx/source.txt you get event he entire source code of the file.
Comment by External U.
9456 | December 12, 2014 11:16:37 AM GMT
This is a regression in CF11 that has been fixed in Update 3. This code will not work on previous versions of ColdFusion. Ensure that you are specifying valid DDX as per the doc wiki: https://wikidocs.adobe.com/wiki/display/coldfusionen/Using+DDX+to+perform+advanced+tasks
Comment by Suchika S.
9457 | December 15, 2014 03:59:11 AM GMT
Ok, thanks for the explanation. We have already updated our code to work with CHF3. Would be nice if regression bugs would be listed too in the release notes issue fixed list.
Comment by External U.
9458 | December 15, 2014 04:22:27 AM GMT
Thanks for your feedback. We will take care of the release notes. We are closing this bug. --- Suchika.
Comment by Suchika S.
9459 | December 15, 2014 04:39:44 AM GMT
Hi Suchika, Please try my code, b/c it fails in Update 3 Enterprise Standalone on x64 Windows. Repeating my comment on 7:51:43 AM GMT+00:00 Dec 12, 2014: <cfhtmltopdf destination="#expandPath('./pdfIn.pdf')#" overwrite="true" pagetype="custom" pagewidth="2" pageheight="2"><cfoutput>#now()#</cfoutput></cfhtmltopdf> <cfsavecontent variable="myDDX"> <?xml version="1.0" encoding="UTF-8"?> <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="pdfOut"> <PageSize width="2in" height="2in" scaleUp="true" /> <PDF source="pdfIn" /> </PDF> </DDX> </cfsavecontent> <cfset fileWrite(expandPath('./myDDX.ddx'), myDDX) /> <!---<cfif isDDX(myDDX)>---> <!---<cfif isDDX("myDDX.ddx")>---> <cfpdf action="processddx" ddxfile="#myDDX#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./pdfOut.pdf')}#" name="myDDXResult" /> <!---</cfif>---> <!---</cfif>---> When I uncomment either <cfif>, then the pdfOut.pdf isn't created in CF11 Update 3 Enterprise Standalone. However, there is no issue at all in CF11 Final Developer Standalone. Thanks!, -Aaron
Comment by External U.
9460 | December 16, 2014 12:59:36 PM GMT
Hi Aaron, Looks like there is a space issue when you write the DDX to a variable using cfsavecontent.For now, you can trim the variable and then check using ISDDX(). I will log a separate bug for it. Thanks, Suchika.
Comment by Suchika S.
9461 | December 18, 2014 01:07:41 AM GMT
Hi Suchika, Thanks for noticing the cfsavecontent space issue and filing #CF-3912078. Why does isDDX(myDDX) return false, when myDDX was created via <cfxml>? Repro: <cfxml variable="myDDX"> <?xml version="1.0" encoding="UTF-8"?> <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd"> <PDF result="pdfOut"> <PageSize width="2in" height="2in" scaleUp="true" /> <PDF source="pdfIn" /> </PDF> </DDX> </cfxml> <cfset fileWrite(expandPath('./myDDX.ddx'), myDDX)> <cfdump var="#isXML(variables.myDDX)# #isDDX(variables.myDDX)# #isDDX("myDDX.ddx")#"> Actual result: YES NO YES Expected result: YES YES YES Thanks!, -Aaron
Comment by External U.
9462 | December 26, 2014 06:06:00 PM GMT
Hi Suchika, Regarding my question in my last comment, please see #CF-4056840. Thanks!, -Aaron
Comment by External U.
9463 | September 15, 2015 03:15:44 PM GMT