Title:
[ANeff] Bug for: attributecollection broken for all tags inside a loop (silent corruption)
| View in TrackerStatus/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
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: