Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 0.7.3, Tokenizer causes Save Changes button in Settings to be impossible to save #22

Open
apoapostolov opened this issue Sep 30, 2020 · 9 comments

Comments

@apoapostolov
Copy link

Confirmed with Find the Culprit. The Settings menu is impossible to close and impossible to save the settings.

@ScyllPoesis
Copy link

ScyllPoesis commented Oct 6, 2020

Can confirm. I'll add the error I saw. Seems like the loading of the default frames in the settings got borked.

foundry.js:14753 Uncaught (in promise) TypeError: Failed to construct 'Image': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
    at FormData.toObject (foundry.js:14753)
    at ExtendedSettingsConfig._getSubmitData (foundry.js:5198)
    at ExtendedSettingsConfig._onSubmit (foundry.js:5172)
toObject @ foundry.js:14753
_getSubmitData @ foundry.js:5198
_onSubmit @ foundry.js:5172

@BradKriss
Copy link

BradKriss commented Oct 19, 2020

So I've been digging into this for the last hour or so and I think I know what the issue is.

The settings fields for both "default npc frame" and "default pc frame" have a setting data type of "Image" as indicated by the console error foundry doesn't like that. I looked into how foundry parses the settings and it looks like it has a series of different cases that it is setup to handle based on the settings data type. I see how it would handle and "Img" but there is not definition of how to handle an "Image".

As far as a fix for it, it looks FilePickerImage defined in settings-extender.js or settings-extender-patched.js handles setting the data type. I'm unclear the difference between settings-extender and it's 'patched' version and not sure if "Img" is a backwards compatible data type.

I can try to look into it a little more and see if I can figure out a fix but any further insight would be super helpful.

@dreamforge2361
Copy link

This is still ocurring with both tokenizer and iconizer...

@ceraetes
Copy link

ceraetes commented Oct 23, 2020

Based on the comment from @BradKriss I tested changing the ImagePicker.Image to ImagePicker.Img and it fixed the issue for me. Created a pull request for it: #26

The iconizer shouldn't be impacted as it doesn't define images in its settings.

@benjaminboruff
Copy link

I just tested this on 0.7.5 and it works!

@sgrigson
Copy link

Any chance we can get this merged? The fix seems simple enough, and I'd prefer not to do a custom mod install if I don't have to.

@vprenner
Copy link

For what it's worth I took what ceraetes did and made edits to the module.json to make it directly installable from Github. You can use this link: https://raw.githubusercontent.com/vprenner/vtta-tokenizer/master/module.json
I also bumped the version to 2.2.2, and set the compatibility flag to 0.7.5. Since the original author has a two month old kid I doubt he'll be merging this anytime soon :) When he does I will delete my fork and everything since I don't want to cause any issues.
Also - use at your own risk and be aware that you are installing a zip file that some random guy from the internet uploaded...

@ceraetes
Copy link

@MrPrimate one of the contributor on the vtta discord also created a package already: https://github.com/MrPrimate/vtta-tokenizer/releases/download/latest/module.json

@manueleiria
Copy link

Version 0.7.6 introduces further issues with Tokenizer. @vprenner have you had a chance to try tokenizer in this version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants