tracker issue : CF-4118895

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

[ANeff] Bug for: attributecollection broken for all tags inside a loop (silent corruption)

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

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

Created: 02/17/2016

Components: Language

Versions: 11.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 0

Listed in the version 2016.0.02.299200 Issues Fixed doc
Related Bugs:
CF-4131528 - Similar to


attributecollection is broken for all tags inside a loop (silent corruption b/c no exception is thrown but data is mangled)

Repro #1 (using <cfhtmltopdf>):

<cfscript>
  for(i=1; i<=4; i++) {
      attribs = {source="http://www.google.com", destination=expandPath("./") & variables.i & '.pdf', overwrite=true};
      if(variables.i is 2) {attribs.orientation = "landscape";}
      cfhtmltopdf(attributecollection=attribs);
  }
</cfscript>

Actual result: All PDFs are landscape except the 1st.

Expected result: All PDFs are portrait except the 2nd.

The orientation attribute's actual default value is "portrait". However, attributecollection remembered that orientation had been set to "landscape" and then used that value going forward.

Repro #2 (using <cfschedule>):

<cfscript>
  for(i=1; i<=4; i++) {
  attribs = {action="update", task='task' & variables.i, url="http://www.adobe.com/products/coldfusion-family.html"};
  if(variables.i is 2) {
  attribs.mode = "application";
  attribs.group = "foo";
  attribs.crontime = "0 0 0 1 1 ? *";
  attribs.publish = true;
  attribs.path = expandPath("./");
  attribs.file = variables.i & '.txt';
  attribs.resolveurl = true;
  attribs.overwrite = false;
  } else {
  attribs.interval = "once";
  attribs.path = expandPath("./");//if removed, exception is thrown (bad)
  attribs.file = variables.i & '_wrong.txt';//if removed, exception is thrown (bad)
  }
  cfschedule(attributecollection=attribs);
  }
  cfschedule(action="list", result="r", mode="server");
  writeDump(r);
  cfschedule(action="list", result="r", mode="application");
  writeDump(r);
</cfscript>

Actual result: complete mess (settings from one task overwrite that of another)

Expected result: correct scheduling

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

Watson Bug ID:	4118895

External Customer Info:
External Company:  
External Customer Name: Aaron Neff
External Customer Email:

Attachments:

Comments:

Related thread: http://prerelease.adobe.com/r/?bf5642710be643d382c313237090728e
Comment by External U.
4685 | February 17, 2016 06:12:28 PM GMT
We are looking into this . Tag reuse doesn't see to be working well for us .
Comment by Suresh J.
4686 | March 13, 2016 08:01:48 AM GMT
Fixed for both cfhtmltopdf and cfschedule. Both need to be integrated with CF11.
Comment by Chinoy G.
4687 | March 14, 2016 02:05:37 AM GMT
Hi Suresh and Chinoy, Issue exists for -all- tags. Only cfhtmltopdf and cfschedule were fixed? I merely selected those at random. Issue should be fixed for -all- tags. Thanks!, -Aaron
Comment by External U.
4688 | March 20, 2016 11:44:36 PM GMT
Hi Aaron, We are going through all the tags and will fix them all. On priority basic, we have targeted these two tags for Hotfix-1 and wanted to release the fix at the earliest.
Comment by Awdhesh K.
4689 | March 21, 2016 12:00:04 AM GMT
Hi Suresh and Chinoy, I see: 1) Issue also exists in CF11 Update 7 2) -Dcoldfusion.udf.reuseTagInstances=false and chf20160001.jar do not resolve the issue Thus: 1) The repro cases above do not show the new regression that I found in CF2016. I did find a new regression. But it is apparently a separate issue. I will re-test the app in CF2016 and try to create a repro case for the new regression that I found. 2) I believe this ticket is not related to CF2016's tag reuse issue. Thanks!, -Aaron
Comment by External U.
4690 | March 21, 2016 12:53:38 AM GMT
Hi Awdhesh, Thank you very much! I was mistaken. I thought the above code was a regression. I did find a regression. But the above code is not the repro for the regression. I think the regression will be higher priority. But I apparently do not yet have the repro case for the regression. So I will re-test the app in CF2016 and create the correct repro case for the regression. Sorry for mistakenly thinking/saying this ticket was a regression. Thanks!, -Aaron
Comment by External U.
4691 | March 21, 2016 12:57:04 AM GMT
Hi Aaron, Thanks for confirming that it's not a regression. Also verified that this is not related to Tag re-use issue. We will be fixing all the effected tags in future updates. Thanks Awdhesh
Comment by Awdhesh K.
4692 | March 21, 2016 01:07:48 AM GMT
Hi Awdhesh, You're very welcome! And also thanks for confirming and for fixes in future updates. This ticket will not be Closed/Fixed until all affected tags are fixed right? Or separate tickets will be created for the remaining tags? Thanks!, -Aaron
Comment by External U.
4693 | March 21, 2016 01:58:35 AM GMT
Will be better if there is a separate ticket for generic fix. Cause, we need one for to track the current fix and its testing status. Please log a separate bug.
Comment by Awdhesh K.
4694 | March 21, 2016 02:11:58 AM GMT
List of tags that are taken for HF2 TagName Attributes io:- DIRECTORYTAG storelocation, storeacl FILETAG fixnewline lang:- DOCUMENTTAG localurl, useragent, scaletofit, htmldir EXECUTETAG svarname, evarname PDFFORMPARAMTAG index, imagefield PDFPARAMTAG iconname, content, filename, description, mimetype, encoding PDFSUBFORMTAG index PDFTAG showonprint, overridepage, compresstiffs, maxscale, maxbreadth, maxlength, jpgdpi, addquads, portfolio, encodeall, hscale, vscale, nojs, nothumbnails, nobookmarks, nocomments,nofonts,nometadata,noattachments,nolinks,ddxfile,leftmargin, topmargin, rightmargin, bottommargin, inputfiles, outputfiles, author, unsignall, flatten, resolution, keypassword, keystorepassword, keystore, keyalias, signaturefieldname LoopTag index, item, from, to, charset, characters, filepath IncludeTag runOnce, targetPage net:- FTPTAG mpassphrase, mkey, mfingerprint IMAPTAG stoponerror, usessl MAILPARAMTAG contentid, contentdispo INDEXTAG criteria SEARCHTAG orderby sql:- QUERYTAG cacheid, cacheregion, name, result ProcParamTag dbVarName
Comment by Nikhil D.
4695 | April 12, 2016 03:03:06 AM GMT
Hi Awdhesh, Sorry for the delay. I see Suchika already filed a separate ticket CF-4131528. Thanks! I still need to look into the other issue that CF2016 introduces, which I haven't yet filed. Will do so soon. Thanks!, -Aaron
Comment by External U.
4696 | April 28, 2016 02:52:08 AM GMT
Aaron, no problem. Its important to find and fill 2016 regression.
Comment by Awdhesh K.
4697 | May 01, 2016 02:02:56 AM GMT