MD: When on 'Token Action' page, TypeError is generated when selecting or interacting with token
buttonpushertv opened this issue · 8 comments
Setup
- OS: Server on Node, Browser client on Windows
- Browser: Chrome
- Module version: MD 1.4.4
- Foundry version: 0.8.7
- Gaming system & version:dnd5e
- Any other modules enabled: yes - CUB v1.6.0 (with Enhanced Conditions enabled)
Describe the bug
With a token selected, and MD in the "Token Control" page, any interaction with tokens causes an error.
Additional context
Disabling CUB eliminates the error in console. Could this be a CUB bug? Or an incompatibility between the 2?
I can't replicate this issue, using the same settings, and the same Foundry, MD and CUB versions.
Looking at the error, it seems that one of the condition buttons is causing this issue. By default, there's only the 'Dead' condition. Could you check what that condition is set to? And maybe try setting it to something else.
Otherwise, what you could try is uninstalling both modules and then reinstalling them, maybe something got corrupted somehow.
That is odd that you don't see it. I tried uninstalling and reinstalling both, but the error remains.
This happens regardless of which conditions are on the token. Even with a fresh token that has had nothing done to it. It still gives the same 'undefined' error.
I have a custom set of 47 Enhanced Conditions in CUB (https://pastebin.com/gBCBmbki), so I don't know if it because of that. Maybe I'm missing a default condition? Or maybe one of the icons for a condition isn't defined properly?
I will keep looking into it on my end, but I may not be much help uncovering the root cause - particularly if it is a CUB bug (or a combo bug of MD & CUB).
Just to clarify, I meant changing the condition in the Stream Deck application.
If those custom conditions replace the default 'dead' condition, then that would explain why you get the error.
I expect that in the Stream Deck application, for the 'Dead' button, if you change 'On Click' from 'Toggle Condition' to 'Toggle CUB Condition', and set 'Condition Name' to 'Dead', it'll work like it should.
Ah. Sorry to not have fully read your previous comment....that seems to have worked.
I guess not a bug.
Great!
For future reference: did you change if from 'dead' to something else and back again, or did you set it to 'Toggle CUB Condition'?
I ended up setting it to 'Toggle CUB Condition' and that stopped the error.
Then I just removed it because I have a macro for doing it that already is using a button & I could free up another button.