Closed janebitovi closed 2 years ago
for in
problem related to this is in a few places in the author code
A2J_Parser.js :: exportXML_CAJA_from_CAJA :: ln 168 and 181
A2J_MobileFile.js :: guide2JSON_Mobile :: ln 114 and 129
A2J_Reports.js :: reportFull :: ln 202 and 222 and 297
We can use this regex search in an editor to quickly jump to the problems: for \(.*\bin\b.*\.(authors|steps)
much of this code is over 7 years old now but it wouldn't have shown up as a problem until the legacy/global author functions run against the canjs/appState guide
because the properties authors
and steps
use a can list instead of plain js arrays in that case.
There was more to unpack in order to reproduce this reliably but recently we updated publish tab to use canjs and we still had to rely on legacy code for API calls. So that's when this started appearing
getting a fix in tonight so we can push it to production tomorrow
for example:
and
The person who notified us of this issue did not experience this part of it, but for me they show up in author too:
Preliminary investigation likely found the main cause of the bad data, but it's such old code that it's not clear if something else changed recently to cause it or if this problem is present and just overlooked in many many guides...
A2J_Parser.js
fn:exportXML_CAJA_from_CAJA
: it's doingfor in
loops instead offor of
loops over canjs array-like lists so ultimately it's injecting prototype keys from the can-lists into the XML.This could be easy to fix but also be difficult/impractical to clean up (or ignore) the existing bad data...