BetterNPCSheet5e icon indicating copy to clipboard operation
BetterNPCSheet5e copied to clipboard

[Bug] Sheet skill broken

Open bakadevil opened this issue 3 years ago • 4 comments

On every NPC sheet I open/create, I cannot check a skill. Some function also no longer works, like Special Traits which no longer opens anything.

I can still use the sheet (using the compendium), but I can no longer change/edit skills (and/or other function like Special Traits)

I launched a game with BetterNPCSheet5e only and faced the same problem.

bakadevil avatar Aug 28 '21 20:08 bakadevil

Also seem to be getting this issue when attempting to add skills to NPCs using BetterNPCSheet. I've tested this in a clean 0.8.9 world with no other modules active (Running 5e 1.43 version). The console output when trying to check a skill box is as follows:

base.js:682 Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
[Detected 1 package: system:dnd5e]
    at BetterNPCActor5eSheet._onCycleSkillProficiency (base.js:682)
    at HTMLAnchorElement.dispatch (jquery.min.js:2)
    at HTMLAnchorElement.v.handle (jquery.min.js:2)
_onCycleSkillProficiency @ base.js:682
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2

IrateRedKite avatar Sep 16 '21 05:09 IrateRedKite

Got the same thing as well

Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
[Detected 1 package: system:dnd5e]
    at BetterNPCActor5eSheet._onCycleSkillProficiency (base.js:682)
    at HTMLAnchorElement.dispatch (jquery.min.js:2)
    at HTMLAnchorElement.v.handle (jquery.min.js:2)

bakadevil avatar Sep 22 '21 13:09 bakadevil

In npc-sheet.html, the line: <input class='hidable-attr' type="hidden" name="data.skills.{{s}}.value" value="{{skill.value}}" data-dtype="Number" /> needs to be moved up four lines, so that it is before <a class="skill-proficiency show-on-edit " title="{{skill.hover}}">{{{skill.icon}}}</a>

The base class from Foundry is expecting to find that element there.

KenGitsIt avatar Jan 07 '22 09:01 KenGitsIt

Fixed in pull request.

KenGitsIt avatar Jan 07 '22 17:01 KenGitsIt