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 .
×
Create a free account

Pathfinder character sheet - token relationship bugged somehow

1485270979

Edited 1485273263
Yesterday I posted this in the Pathfinder Sheet thread.  They were stumped and told me to post it here, so here goes! I'm getting a strange bug on the 0.73 sheet - when I assign a token to represent a character in order to sync HP bar etc. from the sheet etc. at first it works great and everything's fine. However, when I make a new version of the token by dragging the character sheet onto the map, it breaks all of that character's buffs and conditions as well as stopping the syncing of stats between the sheet and the token. The only way I have figured out to fix this is totally closing my browser and reloading my game, after which it will let me make and play with one token of each character but if I delete that token and make a new one (for instance, when moving to a new map) it breaks again. I have tried three different browsers (Chrome, Firefox and IE) and have encountered the same problem with each of them. I can't find a way to 'unfreeze' it without reloading. I have tried removing the token tied to it completely among several other basic solutions. Also duplicating a 'frozen' sheet creates an 'unfrozen' copy of the sheet that suffers from the same problem as the original sheet should I wish to delete its token and drag a new one onto the map. It's deleting the linked token that seems to cause the problem, not the creation of a new token if that helps in identifying this issue at all. Here's some pictures to help illustrate the problem: So I enter Roll20 and the first thing I do is drag one of my PC's character sheets to the map to make the linked token, Here's what the blurb on the token looks like, And on the character sheet I've whacked on some buffs and some conditions. Works like a charm, The CON buff from Bloodrage will of course increase the character's HP which is reflected on the token... Now, here's the problem. I delete the token of our friend Sav here from the map and suddenly things go a little awry, This is after clicking the recalc button around 20 times. The conditions are no longer being applied except, for some reason, Lose Dex, and the buffs no longer say that they are active even though they are activated. Even weirder though, the CON buff from Bloodrage is no longer being applied to the sheet but the extra 4 HP (32 instead of 28) have remained as seen here, Next I try turning off all the buffs and conditions then recalcing some more times. As you can see, nothing changes from the last screen shots other than the buffs/conditions being unticked, Only the character whose token was deleted is affected in this way - all the other characters in my game are unaffected. If I drag a new version of the token onto the map it doesn't fix the 'frozen' sheet. The only way to seemingly fix it is to close roll20 and reopen it or making a new token to represent the duplicated character (and then of course the issue will occur again if you delete the token). Thanks for any help you may be able to provide! EDIT: Just been testing with some friends - when one person deletes a linked token, the bug affects that token's sheet for everyone in the game.  If a person closes and reopens Roll20, it fixes the sheet but only for them.  For everyone else the sheet remains bugged until they personally reload.
1485297813
vÍnce
Pro
Sheet Author
Thanks for posting this JJ.  I'll try and get a test case/game up to help locate the problem.
It's not game-breaking or anything because reloads fix it, just a little bit frustrating! Thanks for spending the time to take a look at it.
1485309594
vÍnce
Pro
Sheet Author
Here's a test case to study. <a href="https://app.roll20.net/join/1958742/HPEtWg" rel="nofollow">https://app.roll20.net/join/1958742/HPEtWg</a> Problem: Linked tokens dragged from the sidebar cause the sheet's sheet worker script to no longer function. Test Case: 1. open a sheet for either of the tokens. Toggle the included buff "Bull's Strength". (buffs sections near top of the sheet) Bar2(blue) is linked to STR-mod, so enabling the buff will change from "0" to "2". This shows that sheet workers are functioning and the token's are linked. 2. DELETE the tested token and drag a new copy of the same character to the editor. 3. repeat the buff test. 4. SHEET'S SHEET WORKERS NO LONGER FUNCTION 5. Only reloading the game will restore a sheet's functionality. 6. This will also happen when making a copy of the linked token and DELETING the "original".
Vince said: Here's a test case to study. <a href="https://app.roll20.net/join/1958742/HPEtWg" rel="nofollow">https://app.roll20.net/join/1958742/HPEtWg</a> Problem: Linked tokens dragged from the sidebar cause the sheet's sheet worker script to no longer function. Test Case: 1. open a sheet for either of the tokens. Toggle the included buff "Bull's Strength". (buffs sections near top of the sheet) Bar2(blue) is linked to STR-mod, so enabling the buff will change from "0" to "2". This shows that sheet workers are functioning and the token's are linked. 2. DELETE the tested token and drag a new copy of the same character to the editor. 3. repeat the buff test. 4. SHEET'S SHEET WORKERS NO LONGER FUNCTION 5. Only reloading the game will restore a sheet's functionality. 6. This will also happen when making a copy of the linked token and DELETING the "original". Is there nothing showing up on in the console log during any of these steps?
1485447279

Edited 1485505566
Jakob
Sheet Author
API Scripter
Put my whole minimal test case here, because it really belongs in this thread. It's easily reproducible for me with this sheet: Strength: &lt;input type="number" name="attr_strength"&gt;, Strength bonus (worker): &lt;span name="attr_str_mod_worker"&gt;&lt;/span&gt;, Strength bonus (autocalc): &lt;input name="attr_str_mod_auto" value="floor((@{strength}-10)/2)" disabled&gt;&lt;/span&gt; &lt;script type="text/worker"&gt; on('change:strength', function() { getAttrs(['strength'], function(v) { setAttrs({str_mod_worker: Math.floor((v.strength-10)/2)}); }); }); &lt;/script&gt; Whenever you delete a token representing a character from the tabletop, sheet workers for that character, and only that character, stop functioning. EDIT: What's even stranger: after a short time (a couple of seconds after deleting the token), even autocalc doesn't update, in fact, nothing updates anymore - changes in the strength attribute are neither reflected in the attributes & abilities tab nor in the autocalc value. The console shows no events (apart from clicking). EDIT 2: Okay, this is really odd. You can reopen the sheet (without reloading Roll20). Sheet workers still do not function. The changed strength is displayed, and autocalc displays the correct value. Attributes & Abilities displays the original value from a few seconds after deleting the token. Further changes to the value do not cause the autocalc field to update. The changed strength is eventually saved to the database, however.
1485454040

Edited 1485506688
vÍnce
Pro
Sheet Author
As team Pathfinder exhales... Thanks for looking at this Riley.
1485506088
Jakob
Sheet Author
API Scripter
Complete reproduction & further information (using my test sheet above): 1) Create character2 Char1, Char2, and associated linked tokens Token1, Token2. 2) Set Strength to 12 for Char1 in the sheet. Notice how everything works as it should. 3) Delete Token1. Set Strength to 14 for Char1, notice how the autocalc field updates to 2, but sheet workers don't fire. I get the following stuff in the console (when I update Strength, not when I delete the token) (sorry for the mess): app.js?1485442972:34 Uncaught TypeError: Cannot read property 'page' of undefined &nbsp; &nbsp; at T.r.&lt;anonymous&gt; (app.js?1485442972:34) &nbsp; &nbsp; at T.r.trigger (base.js?1468423138:1) &nbsp; &nbsp; at T.r._onModelEvent (base.js?1468423138:1) &nbsp; &nbsp; at T.r.trigger (base.js?1468423138:1) &nbsp; &nbsp; at T.r.change (base.js?1468423138:1) &nbsp; &nbsp; at T.r.set (base.js?1468423138:1) &nbsp; &nbsp; at T.r.save (base.js?1468423138:1) &nbsp; &nbsp; at T.r.syncedSave (app.js?1485442972:39) &nbsp; &nbsp; at T.r.saveSheetValues (app.js?1485442972:39) &nbsp; &nbsp; at HTMLDivElement.&lt;anonymous&gt; (app.js?1485442972:38) (anonymous) @ app.js?1485442972:34 trigger @ base.js?1468423138:1 _onModelEvent @ base.js?1468423138:1 trigger @ base.js?1468423138:1 change @ base.js?1468423138:1 set @ base.js?1468423138:1 save @ base.js?1468423138:1 syncedSave @ app.js?1485442972:39 saveSheetValues @ app.js?1485442972:39 (anonymous) @ app.js?1485442972:38 app.js?1485442972:38 CLICKED app.js?1485442972:38 Really updating character sheet values app.js?1485442972:38 Setting up repeating sections took until 1ms app.js?1485442972:38 Finding list of dirty attributes took until 1ms app.js?1485442972:38 Querytest took until 1ms app.js?1485442972:38 Attribute cache compliation took until 2ms app.js?1485442972:38 Set values (including auto-calcuating variables) took until 3ms app.js?1485442972:38 Took 4ms 4) Set Strength to 16. Notice how autocalc no longer updates. Console shows nothing at all . Strength in Attributes & Abilities tab stays at 14. 5) Close & reopen character sheet for Char1. Attributes & abilities shows Strength 14, character sheet shows Strength 16, autocalc shows 3 (correctly). Console shows the normal stuff for opening character sheets. 6) Change Strength to 18 for Char1. Observe how this change is not reflected in either attributes & abilities OR the autocalc value. (you can repeat 5&6, the autocalc value will update after closing & reopening the sheet) 7) Open character sheet for Char2, observe that it works completely fine. 8) The only way to get everything working correctly again seems to be to reload Roll20.
Not sure if this is any help, but I noticed that autocalc only fails for Attributes in the Attributes list on the Attributes & Abilities tab. For example, my Strength is set to 16 and my Dexterity remains the default 10. After deleting the token and dragging a new one onto the tabletop, a change to my base Strength does not trigger the autocalc to change the modifier, yet I can change the base Dexterity and it updates correctly. Also, if I update a field included in the calculation that has not been set (say, a Misc Mod or Temp Mod to Strength), that seems to trigger the autocalc to work, but only&nbsp; once . Once the updated field is included on the A&A tab, it gets frozen, too. This "unset" exception does not work for sheet workers, however; they still seem to be stuck no matter what. This is on a modified D&D 3.5 sheet.
1485537043
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Also, because I was curious if it would make a difference, deletion of tokens via an API script also causes this. This was probably obvious to all you more experienced coders, but thought I'd check.
1485932828
Jakob
Sheet Author
API Scripter
Any dev update on this? This is a nasty error that could affect a lot of people...
1487713734
Gid
Roll20 Team
Update: Sorry for the delay on this. We're actively looking into this issue now.
1487714826
vÍnce
Pro
Sheet Author
Awesome. &nbsp;Thanks
1487726352

Edited 1487787550
Phil B.
Forum Champion
Sheet Author
First off, thanks for the easy reproduction steps and the small reproduction sheet code, Jakob. They made it super easy to pinpoint the error. I've fixed this locally, as well as found some other errors in the same area. (updating attributes on a linked token doesn't trigger sheetworkers) I've fixed all of these locally, but it is too late to push out now. I will push them out to dev tomorrow morning. Once we make sure this fixes the issue I can push it out to main either Thursday morning or early next week, depending on how testing on dev goes. Sorry again for the delay.
1487732481
chris b.
Pro
Sheet Author
API Scripter
"updating attributes on a linked token don't trigger sheetworkers" wow what will this mean, you mean the 3 bars/circles if they are linked? will actually trigger a sheetworker? or something else? (i guess i'll find out when i try it in dev) i thought we'd have to write that ourselves as an api companion.
1488759579
vÍnce
Pro
Sheet Author
Is this supposed to be resolved now? &nbsp;It appears to still be an issue in my test case above...
1489104930
Gid
Roll20 Team
We pushed a fix for this yesterday. Let us know if you're still seeing Sheetworker issues.
1489394013
vÍnce
Pro
Sheet Author
This still seems to be broken in my test case. &nbsp;Anyone else?
1489857225
Gid
Roll20 Team
Vince, if you create anything new since the fix, are you still seeing the broken sheetworkers in your test case? I'm trying to isolate if the broken sheets are ones that were made during the duration this issue was present.
1489861028
vÍnce
Pro
Sheet Author
I created 2 new characters in the test game above. "Subject A after fix" and "Subject B after fix". &nbsp;Problem still exists with sheetworkers failing after deleting a linked token and dragging a new copy to the table. &nbsp;Only reloading the game gets sheetworkers to fire up. &nbsp;;-(
1490338695

Edited 1490338941
Jakob
Sheet Author
API Scripter
I can confirm this is still unresolved on both dev and main, for both new and old characters.
It would be nice to get this fixed. This also affects the MM and Volo. Dragging tokens to a page and then deleting them will break their character sheet, quite annoying!
I have the same problem with 13th Age (legacy) sheets (actually had it a long time but, could not find the steps to reproduce, thanks for the good test cases guys!).
1490773465
Jakob
Sheet Author
API Scripter
Still buggy. Maybe the fix was never rolled out?
1491299514
Jakob
Sheet Author
API Scripter
This is still unsolved.
1491316971
vÍnce
Pro
Sheet Author
and... is probably causing lot's of issues for people and sheet authors without them even knowing it. hmmm
1491413883
Gid
Roll20 Team
Hi everyone, I can concur that this is still an issue on my end too. We'll look into this again. Thank you for keeping this issue alive.
1491434823

Edited 1491494487
Phil B.
Forum Champion
Sheet Author
Sorry it took me so long to get back to this issue. The whole thing is really weird. Looking at the history of the file, the last change that was made was me making the fix the first time. But, when I actually look at the file, the code changes I made are nowhere to be found. So some time between when I made the fix and when it started showing up again the changes disappeared, with no trace whatsoever in Git. Anyways, I've made the changes, again, and they should go out tomorrow morning.
1491443616
vÍnce
Pro
Sheet Author
lol Sounds like my experience with Git. &nbsp;;-P Thanks for doubling back.
1491494581
Phil B.
Forum Champion
Sheet Author
The fixes are live. I tested it myself and it appears fixed, for now. :P Let me know if you try it and have any issues.
1491495123
Jakob
Sheet Author
API Scripter
It appears to be fixed now! Thanks for following up on this, Kristin and Phil.
1491764176
vÍnce
Pro
Sheet Author
It works. &nbsp;Thanks for the update.