p4535992 / foundryvtt-chat-portrait

Other
2 stars 6 forks source link

[BUG] Portraits not showing up anymore after last module update on Foundry V11 #50

Closed ICronyI closed 1 month ago

ICronyI commented 3 months ago

Module Version: v1.0.1

Describe the bug Chat portraits do not show anymore on v11 after last module update

Screenshots

foundry.js:733 Foundry VTT | Error thrown in hooked function '' for hook 'preCreateChatMessage'
#call @ foundry.js:733
call @ foundry.js:712
#preCreateDocumentArray @ foundry.js:13542
await in #preCreateDocumentArray (async)
_createDocuments @ foundry.js:13428
create @ commons.js:8629
await in create (async)
createDocuments @ commons.js:7958
create @ commons.js:8081
processMessage @ foundry.js:85939
_onChatKeyDown @ foundry.js:86228
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
foundry.js:753 TypeError: Cannot read properties of undefined (reading 'OTHER')
    at ChatPortrait.getMessageTypeVisible (ChatPortrait.js:2652:40)
    at ChatPortrait.loadImagePathForChatMessage (ChatPortrait.js:1260:36)
    at Object.fn (main.js:130:38)
    at #call (foundry.js:730:20)
    at Hooks.call (foundry.js:712:38)
    at #preCreateDocumentArray (foundry.js:13542:44)
    at async ClientDatabaseBackend._createDocuments (foundry.js:13428:22)
    at async ChatMessage.createDocuments (commons.js:7958:23)
    at async ChatMessage.create (commons.js:8081:23)
onError @ foundry.js:753
🎁call_wrapped @ libWrapper-wrapper.js:507
🎁Hooks.onError#lib-wrapper @ listeners.js:138
🎁Hooks.onError#0 @ libWrapper-wrapper.js:187
#call @ foundry.js:734
call @ foundry.js:712
#preCreateDocumentArray @ foundry.js:13542
await in #preCreateDocumentArray (async)
_createDocuments @ foundry.js:13428
create @ commons.js:8629
await in create (async)
createDocuments @ commons.js:7958
create @ commons.js:8081
processMessage @ foundry.js:85939
_onChatKeyDown @ foundry.js:86228
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
commons.js:8807 Foundry VTT | Created ChatMessage with id [kMwZo0DzpyICI78T]
ChatPortrait.js:2652 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'OTHER')
    at ChatPortrait.getMessageTypeVisible (ChatPortrait.js:2652:40)
    at ChatPortrait.onRenderChatMessage (ChatPortrait.js:47:42)
    at Object.fn (main.js:69:22)
    at #call (foundry.js:730:20)
    at Hooks.call (foundry.js:712:38)
    at ChatMessage.getHTML (foundry.js:20720:11)
    at async ChatLog.postOne (foundry.js:85744:18)
ChatPortrait.getMessageTypeVisible @ ChatPortrait.js:2652
onRenderChatMessage @ ChatPortrait.js:47
(anonymous) @ main.js:69
#call @ foundry.js:730
call @ foundry.js:712
getHTML @ foundry.js:20720
await in getHTML (async)
postOne @ foundry.js:85744
_onCreate @ foundry.js:20813
callback @ foundry.js:13603
(anonymous) @ foundry.js:13576
#handleCreateDocuments @ foundry.js:13576
await in #handleCreateDocuments (async)
_createDocuments @ foundry.js:13437
await in _createDocuments (async)
create @ commons.js:8629
await in create (async)
createDocuments @ commons.js:7958
create @ commons.js:8081
processMessage @ foundry.js:85939
_onChatKeyDown @ foundry.js:86228
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
foundry.js:7682 Foundry VTT | Retrieved and compiled template templates/hud/chat-bubble.html

Browser:

Foundry Version: 11

Game System: AlienRPG

p4535992 commented 3 months ago

Is correct ? chat_portreait

The last v11 release is https://github.com/p4535992/foundryvtt-chat-portrait/releases/download/0.9.8/module.json

ICronyI commented 3 months ago

Thanks! It automatically updated to 1.0.1 though... i'll revert manually back to 0.9.8, but you probably forgot to put something that stops v11 users from downloading the update if they are still on v11, as most of my other modules tell me that there's an update but won't download it if it's v12 only :)

p4535992 commented 3 months ago

Probably some error on my side that escapes me , but I set as a minimum the 12 should not be "seen" on the 11.

ICronyI commented 3 months ago

Reverting to 0.9.8 fixed it, so it's all good for me :) thanks again!