obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

Bug: Error causing icons to not display correctly, Display rules being reset to defaults with errors

Open ZappedSi opened this issue 1 month ago • 1 comments

My issues shares similarities with #359

Issue 1:

When editing display rule fields I have not gotten Marker Color to accept any hexadecimal colors, and often times colors explicitly stated to be acceptable (ex. cadetblue) and both Marker color and Shape will both intermittently

  • Not update the preview until Save & Close is pressed
  • revert to a muted red and the default shape
  • not do anything at all

Issue 2:

When editing display rule fields, the Marker Icon Properties window closed and the errors below appeared. Upon attempting to open the properties again I got the second error. On the third attempt to open the Marker Icon Properties I was greeted to the same 3 + default display rules that were there on install. This has happened three times with no unusual activity or interactions before it breaks, erasing my work each time.

The errors:

Uncaught TypeError: Cannot read properties of undefined (reading 'startsWith')
    at isFontAwesome (plugin:obsidian-map-view:46887:18)
    at getInternalIconFromOptions (plugin:obsidian-map-view:46869:9)
    at createSimpleCircleMarker (plugin:obsidian-map-view:46939:26)
    at getIconFromOptions (plugin:obsidian-map-view:46797:20)
    at makePreview (plugin:obsidian-map-view:77300:24)
    at eval (plugin:obsidian-map-view:77428:21)
    at eval (plugin:obsidian-map-view:28843:26)
    at eval (plugin:obsidian-map-view:26655:38)
    at update_reaction (plugin:obsidian-map-view:27192:16)
    at update_effect (plugin:obsidian-map-view:27372:18)
isFontAwesome @ plugin:obsidian-map-view:46887
getInternalIconFromOptions @ plugin:obsidian-map-view:46869
createSimpleCircleMarker @ plugin:obsidian-map-view:46939
getIconFromOptions @ plugin:obsidian-map-view:46797
makePreview @ plugin:obsidian-map-view:77300
eval @ plugin:obsidian-map-view:77428
eval @ plugin:obsidian-map-view:28843
eval @ plugin:obsidian-map-view:26655
update_reaction @ plugin:obsidian-map-view:27192
update_effect @ plugin:obsidian-map-view:27372
#traverse_effect_tree @ plugin:obsidian-map-view:25120
process @ plugin:obsidian-map-view:25041
flush_effects @ plugin:obsidian-map-view:25370
flush @ plugin:obsidian-map-view:25196
eval @ plugin:obsidian-map-view:25275
dequeue @ plugin:obsidian-map-view:24925
plugin:obsidian-map-view:46887 Uncaught TypeError: Cannot read properties of undefined (reading 'startsWith')
    at isFontAwesome (plugin:obsidian-map-view:46887:18)
    at getInternalIconFromOptions (plugin:obsidian-map-view:46869:9)
    at createSimpleCircleMarker (plugin:obsidian-map-view:46939:26)
    at getIconFromOptions (plugin:obsidian-map-view:46797:20)
    at Object.makePreview (plugin:obsidian-map-view:77300:24)
    at eval (plugin:obsidian-map-view:77178:30)
    at eval (plugin:obsidian-map-view:28843:26)
    at eval (plugin:obsidian-map-view:26655:38)
    at update_reaction (plugin:obsidian-map-view:27192:16)
    at update_effect (plugin:obsidian-map-view:27372:18)
isFontAwesome @ plugin:obsidian-map-view:46887
getInternalIconFromOptions @ plugin:obsidian-map-view:46869
createSimpleCircleMarker @ plugin:obsidian-map-view:46939
getIconFromOptions @ plugin:obsidian-map-view:46797
makePreview @ plugin:obsidian-map-view:77300
eval @ plugin:obsidian-map-view:77178
eval @ plugin:obsidian-map-view:28843
eval @ plugin:obsidian-map-view:26655
update_reaction @ plugin:obsidian-map-view:27192
update_effect @ plugin:obsidian-map-view:27372
create_effect @ plugin:obsidian-map-view:26505
eval @ plugin:obsidian-map-view:26655
flatten @ plugin:obsidian-map-view:24834
template_effect @ plugin:obsidian-map-view:26654
html @ plugin:obsidian-map-view:28840
EditDisplayRuleDialog @ plugin:obsidian-map-view:77178
eval @ plugin:obsidian-map-view:28047
update_reaction @ plugin:obsidian-map-view:27192
update_effect @ plugin:obsidian-map-view:27372
create_effect @ plugin:obsidian-map-view:26505
branch @ plugin:obsidian-map-view:26676
eval @ plugin:obsidian-map-view:28035
update_reaction @ plugin:obsidian-map-view:27192
update_effect @ plugin:obsidian-map-view:27372
create_effect @ plugin:obsidian-map-view:26505
component_root @ plugin:obsidian-map-view:26607
_mount @ plugin:obsidian-map-view:28032
mount @ plugin:obsidian-map-view:27979
onOpen @ plugin:obsidian-map-view:46967
e.open @ app.js:1
openEdit @ plugin:obsidian-map-view:77268
handle_event_propagation @ plugin:obsidian-map-view:27807
plugin:obsidian-map-view:46982 Uncaught TypeError: this.unmountComponent is not a function
    at SvelteModal.onClose (plugin:obsidian-map-view:46982:14)
    at o (app.js:1:1222410)
    at e.close (app.js:1:1222512)

ZappedSi avatar Nov 22 '25 01:11 ZappedSi

Regarding issue 1, see https://github.com/esm7/obsidian-map-view/issues/188 -- hex colors, and actually most web color names, are not currently supported. It's a top asked fix and I'll get to it in a high priority. Regarding issue 2, can you elaborate what input causes this? It might help if you test this in the just-released 6.0.3, which fixes a few edge cases with display rules.

esm7 avatar Nov 23 '25 19:11 esm7