loop currentrow doesn't work with debug logs pageParts query

Description

private function _toPartsStruct( query parts ){ var dir = getDirectoryFromPath( getCurrentTemplatePath() ) &"/ldev5206/"; systemOutput(dir, true); queryAddColumn(parts, "key"); loop query=parts { var r = parts.currentrow; // TODO currentrow doesn't get picked up? systemOutput( parts.path[ r ], true ); systemOutput( len(parts.path[ r ]) & " " & len( dir ), true ); querySetCell( parts, "path", mid( parts.path[ r ], len( dir ) ), r ); // less verbose querySetCell( parts, "key", parts.path[ r ] & ":" & parts.startLine[ r ] & ":" & parts.endLine[ r ], r ); } systemOutput( parts.toString(), true ); var st = QueryToStruct(parts, "key"); return st; }
// currentrow required LDEV-5210 private function _toPartsStructNoCurrentrow( query pageParts ){ var parts = duplicate( pageParts ); queryAddColumn( parts, "row" ); var r = 0; loop query=parts { var r++; querySetCell( parts, "row", r ); } systemOutput("-------------- _toPartsStructNoCurrentrow", true); loop list="path,min,max,avg,count,total,id,start,end,snippet" item="local.col" { queryDeleteColumn(parts, col); } return parts; }

 

image-20241218-100737.png

row should be numbered, 1 to 8?

when the currentrow isn’t explicitly passed, the wrong row is referenced ( see testcase for 5206 )

Environment

None

Attachments

1
  • 18 Dec 2024, 10:08 am

Activity

Show:

Zac Spitzer 18 December 2024 at 14:33

Unresolved

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 18 December 2024 at 09:22
Updated 15 January 2025 at 08:08

Flag notifications