#Weird Scenes
1 messages · Page 1 of 1 (latest)
Hey, could you run this bit of code in your console?
await ui.sidebar.tabs.scenes.getData()
You should have a spot where you can type at the bottom of the console
yup done
What did it write out to the console?
{user: UserPF2e, tree: {…}, canCreate: true, documentCls: 'scene', tabName: 'scenes', …}
ok, so there's no failure in the data builder. That's the data that gets used by Handlebars to fill in the scenes sidebar.
Also, in the Scenes Tab there is no option to create new scenes or folders
Just nothin
right, with the console open, can you click the "Network" tab and then (keeping console open) refresh the page
I tried that already, no luck
I'm just wondering if the scene html file is failing to download
Ok done again
You'll want to scroll through the large list of entries and look for anything in red
Nothing in red
ok, so everything is downloading correctly then
in the console try running this command:
game.user.isGM
that should print true to the console
It did
ok, lol I'm slowly running out of ideas
I appreciate your time regardless
It's extra hard when there are no errors in the console because they can usually direct us to the line of code that's failing
Is it possible that I'm missing the errors somehow?
Doubtful, they show as all red text in the console
When I open up the console sidebar there is a set of stuff including an entry for errors that shows 2 but I don't know how to look at them
ok, in the Console tab you should see this "Default levels" drop down
You can deselect the "Info" option
should clean up everything and only show the warnings and errors
Oh when I went to look at that it was grayed out and I noticed there was something in the filter. When I erased it, this appeared:
Darn old line 3237
ok, so I'm not sure at the moment why this is happening, but it looks like you're getting into what we call a Stack Overflow. Likely a function calling itself so much that it just dies. That would likely be caused by a circular reference inside of the data.
My best guess is something like a Folder referencing itself. Would cause literal Folder Inception lol
did you happen to have any modules that did folder stuff?
Uh probably
Like increase the maximum number of folders allowed?
I did try to see if turning off the modules did anything and it didn't
However I also notice that in two my worlds, my Shared Folders (from the Shared Compendiums module) is no longer working
Which is true for this world
Have to go make dinner. Thanks for trying to help
Yeah, it might be a case where you just need a script that will go through and delete all the folders
Ok, when you have some time, I've written a macro script that specifically deletes all folders in the Scenes tab. This should hopefully work and restore your scenes. Just throw this code in a script macro and try running it
const folders = new Map();
function processFolder(folder) {
if(folders.has(folder.id)) return;
folders.set(folder.id, folder);
}
(async() => {
const scenes = game.scenes.contents;
for (const scene of scenes) {
const folder = scene.folder;
if (!folder) continue;
processFolder(folder);
}
for(const folder of [...folders.values()]) {
await folder.delete();
}
})();