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

[BUG][API] The journal folder property of the Campaign() object is not updated

1492617107

Edited 1492631759
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
While working on a new script, I noticed that the journal folder property of a campaign is empty until a folder is made by the user even though there are "Characters" and "Handouts" folders pre generated by the game. Steps to replicate: Load the below snippet in a fresh campaign: on('ready',()=>{ log(Campign().get('journalfolder')); }); //Will log ""
1492629037

Edited 1492629053
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Additionally, it looks like the updates outlined in  this announcement haven't taken effect? The characters and handouts folders still have ids of "-characters" and "-handouts" respectively.
1492629665
Gid
Roll20 Team
This may have something to do with the pseudo nature of the initial Character and Handout folders that show up when you first add characters and handouts to the Journal Tab of a new game. Those pseudo folders don't actually become real until you rename one, reorder them, or create your own custom folder. I'll ask the devs for more info. Thank you for bringing this to our attention.
1492631794
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks Kristin, Thought it might be something like that.
1492638606
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Scott, What Kristin said is correct. The Handouts and Characters folders don't actually exist until any kind of folder change is made. Rearranging items, adding a new folder, etc. As soon as that happens then the folder structure gets written for the first time. This design decision was made to mimic the behavior Roll20 had before we had folders at all, so users at that time didn't get a bad UI shock and misunderstand what was happening. It's a little dated and confusing now, so we may change this behavior in the future. As for the dynamic id code not working, we had a few hours earlier today where some of our servers were cached with old code and weren't serving the new updated code. It should be fixed now. Let us know if you're seeing any issues.
1492640784

Edited 1492641059
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The folder id's are still not dynamic, unless their dynamic id's are supposed to be just "-characters" and "-handouts". Tried in a brand new game as well, same id's. Ok, new game does actually have dynamic ids, but my pre-existing game does not.
1492641686
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Scott C. said: The folder id's are still not dynamic, unless their dynamic id's are supposed to be just "-characters" and "-handouts". Tried in a brand new game as well, same id's. Ok, new game does actually have dynamic ids, but my pre-existing game does not. Correct. This change will only affect new games, or games that do not already have a folder structure.
1492641926
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
ah, gotcha