tracker issue : CF-4056840

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

[ANeff] Bug for: <cfpdf action="processddx"..> vs isDDX()

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 09/15/2015

Components: Document Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win XP All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on May 17, 2018 using build 2016.0.01.298513
Two issues:
1) isDDX(myDDXVar) always returns NO for valid DDX. It should return YES
2) <cfpdf action="processddx"..> auto-trims DDX (but isDDX() doesn't). There should be consistency.

Repro:

<cfdocument format="pdf" filename="#expandPath('./pdfIn.pdf')#" overwrite="true"><cfoutput>#now()#</cfoutput></cfdocument>

<cfsavecontent variable="myDDX1">
<?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>
<cfpdf action="processddx" ddxfile="#myDDX1#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF1.pdf')}#" name="myDDXResult1">
<cfset fileWrite(expandPath('./myDDX1.ddx'), myDDX1)>
<cfoutput>#isDDX(myDDX1)# #isDDX("myDDX1.ddx")# #myDDXResult1.pdfOut#</cfoutput>

<cfsavecontent variable="myDDX2">
<?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>
<cfpdf action="processddx" ddxfile="#myDDX2#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF2.pdf')}#" name="myDDXResult2">
<cfset fileWrite(expandPath('./myDDX2.ddx'), myDDX2)>
<cfoutput>#isDDX(myDDX2)# #isDDX("myDDX2.ddx")# #myDDXResult2.pdfOut#</cfoutput>

<cfxml variable="myDDX3">
<?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>
<cfpdf action="processddx" ddxfile="#myDDX3#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF3.pdf')}#" name="myDDXResult3">
<cfset fileWrite(expandPath('./myDDX3.ddx'), myDDX3)>
<cfoutput>#isDDX(myDDX3)# #isDDX("myDDX3.ddx")# #myDDXResult3.pdfOut#</cfoutput>

<cfxml variable="myDDX4">
<?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>
<cfpdf action="processddx" ddxfile="#myDDX4#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF4.pdf')}#" name="myDDXResult4">
<cfset fileWrite(expandPath('./myDDX4.ddx'), myDDX4)>
<cfoutput>#isDDX(myDDX4)# #isDDX("myDDX4.ddx")# #myDDXResult4.pdfOut#</cfoutput>

Actual result: NO NO successful NO NO successful NO YES successful NO YES successful

Expected result: Consistency, so either:
1) Expected result: NO NO failed NO NO failed YES YES successful YES YES successful
-or-
2) Expected result: YES YES successful YES YES successful YES YES successful YES YES successful

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

Watson Bug ID:	4056840

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:  
External Test Config: Verified in ColdFusion 11 Update 5 (build 11,0,05,293506).

Attachments:

Comments:

Please disregard the repro in the description and use this instead: Revised repro: <cfdocument format="pdf" filename="#expandPath('./pdfIn.pdf')#" overwrite="true"><cfoutput>#now()#</cfoutput></cfdocument> <cfsavecontent variable="myDDX1"> <?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> <cfpdf action="processddx" ddxfile="#myDDX1#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF1.pdf')}#" name="myDDXResult1"> <cfset fileWrite(expandPath('./myDDX1.ddx'), myDDX1)> <cfoutput>#isXML(myDDX1)# #isDDX(myDDX1)# #isDDX(expandPath('./myDDX1.ddx'))# #myDDXResult1.pdfOut#</cfoutput> <cfsavecontent variable="myDDX2"><?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> <cfpdf action="processddx" ddxfile="#myDDX2#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF2.pdf')}#" name="myDDXResult2"> <cfset fileWrite(expandPath('./myDDX2.ddx'), myDDX2)> <cfoutput>#isXML(myDDX2)# #isDDX(myDDX2)# #isDDX(expandPath('./myDDX2.ddx'))# #myDDXResult2.pdfOut#</cfoutput> <cfxml variable="myDDX3"> <?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> <cfpdf action="processddx" ddxfile="#myDDX3#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF3.pdf')}#" name="myDDXResult3"> <cfset fileWrite(expandPath('./myDDX3.ddx'), myDDX3)> <cfoutput>#isXML(myDDX3)# #isDDX(myDDX3)# #isDDX(expandPath('./myDDX3.ddx'))# #myDDXResult3.pdfOut#</cfoutput> <cfxml variable="myDDX4"><?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> <cfpdf action="processddx" ddxfile="#myDDX4#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF4.pdf')}#" name="myDDXResult4"> <cfset fileWrite(expandPath('./myDDX4.ddx'), myDDX4)> <cfoutput>#isXML(myDDX4)# #isDDX(myDDX4)# #isDDX(expandPath('./myDDX4.ddx'))# #myDDXResult4.pdfOut#</cfoutput> Actual result: NO NO NO successful YES YES YES successful YES NO YES successful YES NO YES successful Expected result: NO NO NO failed YES YES YES successful YES YES YES successful YES YES YES successful
Comment by External U.
5879 | September 15, 2015 03:42:25 PM GMT
Hi Aaron, Isn't this bug duplicate to https://watsonexp.corp.adobe.com/#bug=CF-3912078? Thanks, Suchika.
Comment by Suchika S.
5880 | September 21, 2015 02:10:16 AM GMT
Hi Suchika, I misunderstood the issue(s) in the other tickets. So I created this new ticket which describes the actual issues. There are actually 3 issues: Example 1) cfsavecontent preserves the wrapping line breaks (good). Thus, myDDX1 is not valid DDX. Therefore, action="processddx" should throw an exception. But, instead of throwing an exception, the DDX is successfully processed (proven b/c the resultant PDF's dimensions are 2in x 2in). <cfdocument format="pdf" filename="#expandPath('./pdfIn.pdf')#" overwrite="true"><cfoutput>#now()#</cfoutput></cfdocument> <cfsavecontent variable="myDDX1"> <?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> <cfpdf action="processddx" ddxfile="#myDDX1#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF1.pdf')}#" name="myDDXResult1"><!--- This should throw an exception b/c myDDX1 isn't valid DDX ---> 2) cfxml excludes the wrapping line breaks (good). Thus, myDDX3 and myDDX3.ddx are valid DDX. Therefore, isDDX(myDDX3) and isDDX(expandPath('./myDDX3.ddx')) should both return YES. But, isDDX(myDDX3) incorrectly returns NO. <cfdocument format="pdf" filename="#expandPath('./pdfIn.pdf')#" overwrite="true"><cfoutput>#now()#</cfoutput></cfdocument> <cfxml variable="myDDX3"> <?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> <cfpdf action="processddx" ddxfile="#myDDX3#" inputfiles="#{pdfIn=expandPath('./pdfIn.pdf')}#" outputfiles="#{pdfOut=expandPath('./myPDF3.pdf')}#" name="myDDXResult3"> <cfset fileWrite(expandPath('./myDDX3.ddx'), myDDX3)> <cfoutput>#isDDX(myDDX3)# #isDDX(expandPath('./myDDX3.ddx'))#</cfoutput><!--- isDDX(myDDX3) should return YES since myDDX3 is valid DDX ---> 3) Both Example 1 and Example 2 create temp files in CF's logs directory. Example: C:\ColdFusion11\cfusion\logs\PDFOUT_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.tmp Thanks!, -Aaron
Comment by External U.
5881 | September 21, 2015 01:57:59 PM GMT
Hi Aaron, 1) The first one is failing because there is a discrepancy between <cfpdf action="processddx" ...> & ISDDX().<cfpdf action="processddx" ..> trims the DDX variable before processing and ISDDX does not trim it before use. 2) & 3) we will check that as a part of this bug. So, changing this to Fix. Thanks, Suchika.
Comment by Suchika S.
5882 | September 22, 2015 12:38:05 AM GMT
Hi Aaron, We will fix all three issues that you have mentioned here . To avoid all confusions , we have closed all other bugs and kept this one open. Thanks, Suchika.
Comment by Suchika S.
5883 | September 22, 2015 01:03:44 AM GMT
Hi Suchika, Thanks for clarification on #1 and marking #2 and #3 ToFix. Regarding #1, my option was there should not be a discrepency. But, as long as its documented then I suppose it is fine. So I've added the following to cfpdf's ddxfile description: "ColdFusion trims the DDX before processing." Thanks!, -Aaron
Comment by External U.
5884 | September 22, 2015 01:11:50 AM GMT
Hi Suchika, OH! Okay, thanks! So should I undo my cfpdf ddxfile description edit? (referred to in my previous comment) Thanks!, -Aaron
Comment by External U.
5885 | September 22, 2015 01:13:21 AM GMT
I hadn't seen your "We will fix all three issues that you have mentioned here." reply until after I'd posted my "Thanks for clarification on #1 and marking #2 and #3 ToFix." comment. =) I was checking on something before posting my comment. Thanks!, -Aaron
Comment by External U.
5886 | September 22, 2015 01:14:31 AM GMT
And, geez, the "Regarding #1, my option was" should've been "Regarding #1, my opinion was". I'm tired =)
Comment by External U.
5887 | September 22, 2015 01:15:21 AM GMT
Logged an enhancement where iSDDX() would accept XML variables. Bug no:CF-4069951
Comment by Suchika S.
5888 | October 07, 2015 04:58:33 AM GMT
Hi Suchika, I'm unable to view CF-4069951. Would you please be able to make it public so we can vote on it? Thanks!, -Aaron
Comment by External U.
5889 | October 07, 2015 02:14:24 PM GMT
(repeating..) Hi Suchika, I'm unable to view CF-4069951. Would you please be able to make it public so we can vote on it? Thanks!, -Aaron
Comment by External U.
5890 | October 14, 2015 01:02:06 AM GMT
Hi Aaron, Sorry for the delayed response,it is made external now. Thanks, Suchika.
Comment by Suchika S.
5891 | October 14, 2015 01:53:15 AM GMT
Hi Suchika, No problem - thanks for filing it. And I've voted for it. Thanks!, -Aaron
Comment by External U.
5892 | October 14, 2015 02:05:20 AM GMT
As part of this bug, issues 2 and 3 have been fixed. A separate ER bug has been raised for 1st issue with bug id #CF-4069951, so closing this.
Comment by Kailash B.
5893 | October 29, 2015 04:59:07 AM GMT
Hi Adobe, Regarding the 3 issues in my 09/21/2015 13:57:59 GMT comment: - Issue 1 was a misunderstanding on my part. Nothing was, or needed, changed. - Issue 2 is covered under CF-4069951 (which I've verified still isn't fixed). - Issue 3 - I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Temp files are no longer created in CF's logs directory. Example: C:\ColdFusion11\cfusion\logs\PDFOUT_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.tmp Thanks!, -Aaron
Comment by Aaron N.
27846 | May 17, 2018 09:11:24 AM GMT