Details
-
Bug
-
Resolution: Fixed
-
Minor
-
3.2
-
None
-
Easy
-
N/A
-
N/A
-
Description
In some isolated cases, when the last column of the livetable is set as hidden, the documents that would normally have to be returned from the livetable query are not displayed if they have doc_viewable = false in the JSON. They should appear without links, object property values or actions, but in this case they don't.
The bug is within #livetablecallback from macros.vm (around line 1600)
else { var page = row["doc_fullname"]; var dp = page.indexOf(':'); var p = page.indexOf('.'); var space = (dp > 0) ? page.substring(dp + 1, p) : page.substring(0, p); var name = page.substring(p + 1); #foreach($colname in $collist) #if("$!colprop.type"!="hidden") ... #end #end $('${divid}-inaccessible-docs').removeClassName('hidden'); } return tr;
The foreach loop here contains
#if("$!colprop.type"!="hidden")
, but $colprop isn't initialized anywhere. It should be reinitialized at every iteration of the respective loop. Otherwise, it will have the value from other code that is executed before. Hence in my particular case it always had $colprop.type = "hidden", so that branch of code was never executed.