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] Creating Tokens with an invalid layer kills all graphics on all pages in campaigns

1387951619

Edited 1387951708
I decided to go ahead and make a script that via chat command creates tokens for an encounter. When I set up the actual createObj section I wasnt sure what to set the layer to exactly to put the new tokens on the GM Layer. This portion is currently undocumented in the wiki. Eventually i found the correct text to use but before that the incorrect code destroyed all pages on my campaign. Not a huge deal as most of them were not being used anymore but its a pretty big bug. Here is the code I used. var token = createObj("graphic", { _pageid: Campaign().get("playerpageid"), name: name + " " + id, represents: characterId, imgsrc: imageFile, layer: "GM Layer", width: 70, height: 70, top: 350, left: 350 }); If you create a token with the layer set to any value that is not valid the entire canvas on the page turns white. In fact all other pages have no canvas at all. and any new pages have the same issue. I was able to duplicate the campaign and as long as I didn't duplicate the pages it would be fixed. This is very repeatable. Every time i ran the code that incorrectly assigns the layer the entire campaign breaks down graphically and nothing shows up anymore. My code is all set now so it works, and I will start creating a new campaign without pages and rebuild what I need in a new copy.
1388003573
Gauss
Forum Champion
What is the name of your campaign and the last date it was working? The Devs may be able to reclaim it.
I will push out a fix for this soon. As Gauss said, we may be able to recover your existing campaign if you give us more details. Also, the "layer" property is documented here: <a href="https://wiki.roll20.net/API:Objects#Path" rel="nofollow">https://wiki.roll20.net/API:Objects#Path</a> Typically we only provide the full notes for the property in the first object that it appears in for the docs, but I guess we should just repeat ourselves throughout to make sure it's not missed.
The name of the campaign is "50 Fathoms Dev" (its on the dev server). It worked fine as of 11PM on Sunday the 22nd. That was the end of our last session. If you can't do it, its not a big deal, Really only need to re create a world map page as the rest of them were well behind us. If you can thats cool. As for the documentation, Riley, I see what you're talking about now but I never bothered to look at the Path section as I have had no need yet to deal with paths. The way it is currently organized I think you're right it might be helpful to just repeat it unless you were to add a section about layers and such, like a glossary of common attributes and link between them. Either way it wasn't the end of the world but I figured it was a big enough bug that you guys should be aware of it. Thanks guys!