Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Advertisement Create a free account

[BUG] "Ghost rows" in repeating sections when a dash '-' is used in the section name

1609271913

Edited 1614585632
Peter B.
Pro
Sheet Author
Detailed description of the Okay so I have been pulling my hair on this one for the entire day and I finally managed to reproduce the exact steps that this bug happens under! The problem arises in the AD&amp;D 2E Revised character sheet:&nbsp; <a href="https://github.com/Roll20/roll20-character-sheets/tree/master/AD%26D%202E%20Revised" rel="nofollow">https://github.com/Roll20/roll20-character-sheets/tree/master/AD%26D%202E%20Revised</a> , but could very well also be a problem in other character sheets! In the sheet there are two repeating sections: &lt;fieldset class="repeating_gear"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="text" name="attr_geardesc" &lt;/fielde &lt;fieldset class="repeating_gear-stored"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;input type="text" name="attr_gear-stored-desc"&gt; &lt;/fieldset&gt; For each row to the&nbsp; gear-stored &nbsp;section, an invisible ghost row will confuse the index in the&nbsp; gear &nbsp;section. The nomral 'Add' button can be used. I also tested with a sheet worker with the following code: let newrowid = generateRowID(); let section = "gear-stored"; let field = "gear-stored-desc"; let newValue = {}; newValue[`repeating_${section}_${newrowid}_${field}`] = "test"; setAttrs(newValue); Minimum steps to reproduce the problem Steps to reproduce Have two repeating sections. In this case&nbsp; gear &nbsp;and&nbsp; gear-stored Use a sheet worker or the 'Add' button to create a new row in section&nbsp; gear-stored See that a row is created in the&nbsp; gear-stored &nbsp;section. Try to read the first value of the&nbsp; gear&nbsp; section&nbsp;using the chat command:&nbsp; @{selected|repeating_gear_$0_geardesc} Expected Get an error that field does not exist, similar to this: Actual Get an empty string as a value and print it in the chat: Note: If you delete the row in the gear-stored &nbsp;section then the invisible "ghost row" will also disappear from the gear &nbsp;section. I have setup a test game with a button that runs the above code and inserts the ghost rows:&nbsp; <a href="https://app.roll20.net/join/9451746/0amewg" rel="nofollow">https://app.roll20.net/join/9451746/0amewg</a> I have made a button, that is hooked up to the above mention sheet worker code for insert rows into the&nbsp; gear-stored &nbsp;section, for easier and faster testing. The same bug has also been tested with two other sections named&nbsp; weapons &nbsp;and&nbsp; weapons-damage , where the same behavior has been spotted. For each row in the&nbsp; weapons-damage &nbsp;section, an invisible "ghost row" will confuse the index of the weapons &nbsp;section. Description of setup Tested with the following browsers Google Chrome v. 83.0.4103.61 (Official Build) (64-bit) &nbsp; &nbsp; No Addons/Extensions (Clean install) Firefox v.&nbsp;84.0.1 (64-bit) &nbsp; &nbsp; No Addons/Extensions (Clean install) Microsoft Edge v. 87.0.664.66 (Official build) (64-bit) &nbsp; &nbsp; No Addons/Extensions (Clean install) Operating system Edition Windows 10 Pro Version 20H2 OS Build 19042.685 Experience Windows Feature Experience Pack 120.2212.551.0 Personally I think the problem is that the dash in the section name gets confused with the dash in the row id, and that is the culpit for the problem. I have however not been able to find any documentation saying that dashes are not allowed in repeating section names.
1609626143
Peter B.
Pro
Sheet Author
I made another minimal test game to ensure nothing in my own sheet was creating problems. I can still reproduce the bug in a sheet only containing the following code: &lt;div class="sheet-2colrow"&gt; &lt;div class="sheet-col"&gt; repeating_row &lt;fieldset class="repeating_row"&gt; &lt;input type="text" name="attr_name" title="repeating_row_$X_name"/&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; repeating_row-dash &lt;fieldset class="repeating_row-dash"&gt; &lt;input type="text" name="attr_name" title="repeating_row-dash_$X_name" /&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;/div&gt; I made another test game with the bug visible here: Ghost rows minimal example
1610017388
Peter B.
Pro
Sheet Author
Update: Roll20 has use the information in this post to created bug ticket for their internal Development team. Hopefully it will be fixed some day in the future.
1610956448
Peter B.
Pro
Sheet Author
Found another example that introduces Ghost rows. Repeating section using numbers can also introduce it! The following code has replicated the problem: &lt;div class="sheet-2colrow"&gt; &lt;div class="sheet-col"&gt; repeating_row &lt;fieldset class="repeating_row"&gt; &lt;input type="text" name="attr_name" title="repeating_row_$X_name"/&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;div class="sheet-col"&gt; repeating_row2 &lt;fieldset class="repeating_row2"&gt; &lt;input type="text" name="attr_name" title="repeating_row2_$X_name" /&gt; &lt;/fieldset&gt; &lt;/div&gt; &lt;/div&gt;
1610957974

Edited 1610957993
Peter B.
Pro
Sheet Author
Workaround for "ghost rows" messing with indexes: Step 1 - Find the rows that cause trouble: Use the following code to find all the rows that have problems: Should be index0: @{selected|repeating_weapons_$0_weaponname} Should be index1: @{selected|repeating_weapons_$1_weaponname} Should be index2: @{selected|repeating_weapons_$2_weaponname} ... Any row that comes back with an empty name is affected by a ghost row. See this images for an example output: Step 2 - Fix the order In order to "fix" the order of rows for a repeating sections, click ' Modifiy ' and moving the lowest rows to the top. Do that for all rows affected: Step 3 - Validate the indexes: Use the same code as before to validate the new indexes are correct: Should be index0: @{selected|repeating_weapons_$0_weaponname} Should be index1: @{selected|repeating_weapons_$1_weaponname} Should be index2: @{selected|repeating_weapons_$2_weaponname} ... I hope this helps anyone who experiences the problem with rows :)
1611028812
vÍnce
Pro
Sheet Author
Hi Peter, have you also reported this to the helpdesk ?&nbsp; Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-(
1611046737
Peter B.
Pro
Sheet Author
∇ince said: Hi Peter, have you also reported this to the helpdesk ?&nbsp; Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-( Hey Vince, thank you for your interest. Yes, I have added it to the helpdesk and they have replied: Peter B. said: Update: Roll20 has use the information in this post to created bug ticket for their internal Development team. Since they created the bug ticket, I haven't heard anymore from the help desk. So I guess it will be fixed "soon™"&nbsp; ¯\_(ツ)_/¯
1611049231
vÍnce
Pro
Sheet Author
soon™... ;-)
1611049237
Andreas J.
Forum Champion
Sheet Author
Translator
∇ince said: Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-( Well, the sticky thread tells us to submit a support ticket, and says nothing about making posts here. They really should change the name of the place and communicating this more clearly.
1611049331
vÍnce
Pro
Sheet Author
ᐰndreas J. said: ∇ince said: Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-( Well, the sticky thread tells us to submit a support ticket, and says nothing about making posts here. They really should change the name of the place and communicating this more clearly. Agreed.
1611127010
Peter B.
Pro
Sheet Author
∇ince said: ᐰndreas J. said: ∇ince said: Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-( Well, the sticky thread tells us to submit a support ticket, and says nothing about making posts here. They really should change the name of the place and communicating this more clearly. Agreed. Agreed! ∇ince said: Hi Peter, have you also reported this to the helpdesk ?&nbsp; Seems that the roll20 has stopped reading the Bug Reports &amp; Technical Issues forum... ;-( I sent the new information about numbers also creating "ghost rows", ie. repeating_row and repeating_row2 &nbsp;and help desk returned with the following email: Hi there, Thanks for providing this information. I'm adding it to the ticket I created previously. If there's anything else I can do for you please don't hesitate to let me know. With this I hope that the fix will be either more extensive/complete and maybe even "sooner™"!