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

Not working for me anymore in Obsidian 1.5.11 #8

Open
AngelCrawford opened this issue Mar 21, 2024 · 7 comments
Open

Not working for me anymore in Obsidian 1.5.11 #8

AngelCrawford opened this issue Mar 21, 2024 · 7 comments
Labels
question Further information is requested

Comments

@AngelCrawford
Copy link

AngelCrawford commented Mar 21, 2024

Two days ago I updated Obsidian to version 1.5.11. Since then the Symbols Prettifier doesn't work anymore for me.
None of the symbols will get replaced on my site.

More Infos:

  • I did not update any of my other Community Plugins -> Update: Did update the Dataview Plugin a day ago
  • Noticed this only after the new Obsidian Update
  • Not working on Windows 10 and Windows 11
  • Used Community Plugins: Calendar, Dataview, Iconize, Reminder, Style Settings, Symbols Prettifier, Task Collector (TC), Templater
  • Used Theme: AnuPpuccin, AnuPpuccin Themes Extended with Atom used
  • Tried: Restartet Obsidian, removed Plugin, restarted Obsidian again, installed Plugin new
  • EDIT: Disabled all other Plugins and used the Minimal Theme, problem is still there
  • EDIT 2: Created a new Test vault, added only this Plugin, still not working

Strange behavior: One of my vaults, with another theme and plugins, but new Obsidian version, does still work as expected. I think this could be a DAU (user is the problem) problem, but not sure.

Love the plugin and hopefully someone could have a look into this! Thanks for the nice Plugin, already use Iconize from the developer :)

EDIT: Und Grüße aus Deutschland xD

@AngelCrawford
Copy link
Author

The new test vault worked after a restart, so it has to be a problem on my end.
Could someone help me, or guide me, in the right direction of what I can do now, please?

@notuntoward
Copy link

notuntoward commented Apr 7, 2024

I have the same problem, but haven't found the cause either.

@FlorianWoelki
Copy link
Owner

heyhey, thank you for the feedback!

i am not entirely sure what the problem is because i am not able to reproduce it at all :(

i've got obsidian 1.5.12 and the minimal theme and things just work for me. you can feel free to debug the issue yourself in the code and i am willing to help here.

btw. is there any error or something in the developer console (View -> Toggle Developer Console)?

@FlorianWoelki FlorianWoelki added the question Further information is requested label Apr 7, 2024
@notuntoward
Copy link

notuntoward commented Apr 7, 2024

I'm also using obsidian 1.5.12, and so far I've been unable to get prettifier to work on either Minimal or Gitsidian. Unfortunately, I don't know javascript, so would not be of much debugging use. For example, I can't figure out how to open developer console.

But but my list of plugins. To you, do any of these look likely to interfere with prettifier?

Update: waitaminute, are symbols like --> supposed to be surrounded in backticks? I just did this accidentally and it seems to work, although the backgrounds in the substitutions are gray, like in codeblocks. From the documentation, I didn't understand this, and maybe this is true for others, tool.

@AngelCrawford
Copy link
Author

AngelCrawford commented Apr 8, 2024

Found the problem on my site. DataviewJS is the culprit.
If I have Dataview Code in my Note, then everything works as expected and all Symbols will get replaced.
But if I have DataviewJS Code in the Note, then the Symbol will not get replaced.

  • Writing under the DataviewJS codeblock -> Not working
  • Writing under the Dataview codeblock -> Working (same note, see Screenshot below)
  • Writing over the DataviewJS codeblock -> Not working (same note, see Screenshot below)
  • Removing the DataviewJS Code in the same note, and Symbols will get replaced everywhere again
  • No error in the Dev console

Here is my Note.

image

\```dataviewjs
const startOfWeek = moment(dv.current().file.name, 'YYYY-MM-DD - 📆 dddd').isoWeekday("Monday");
const endOfWeek = moment(startOfWeek).add(6, 'days');
let daymojis = {};

for (let day = 0; day <= 6; day++) {
    let currentDate = moment(startOfWeek).add(day, 'days').format("YYYY-MM-DD");
	let fileNamePath = moment(currentDate).format("YYYY-MM-DD - 📆 dddd");
	let fileName = `"` + dv.current().file.folder + "/" + fileNamePath + `"`;
	let dailyNote = dv.pages(fileName);

    if (dailyNote.length > 0) {
        let daymoji = dailyNote[0].Daymoji;
        let weekday = moment(currentDate).format('dddd');
        let icon = "";
        daymojis[weekday] = daymoji ? daymoji + " " + icon : icon;
    }
}

dv.table(
    ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
    [
        [
            daymojis["Monday"] || "",
            daymojis["Tuesday"] || "",
            daymojis["Wednesday"] || "",
            daymojis["Thursday"] || "",
            daymojis["Friday"] || "",
            daymojis["Saturday"] || "",
            daymojis["Sunday"] || ""
        ]
    ]
);
\```

# 🏢 08.04. Monday

* **Daymoji**:: 🖊
- Will **not work** => -> 


> [!multi-column]
> 
>> [!example]+ Heute erstellt
>> ```dataview
>> LIST
>> WHERE file.cday = this.file.day AND file.path != this.file.path
>> SORT file.cday ASC
>> LIMIT 10
>> ```
>
>> [!note]+ Heute geändert
>> ```dataview
>> LIST
>> WHERE file.mday = this.file.day AND file.path != this.file.path
>> SORT file.mday ASC
>> LIMIT 10
>> ```

- This **will work** ⇒ → 

@FlorianWoelki
Copy link
Owner

FlorianWoelki commented Apr 10, 2024

thanks for the detailed report. unfortunately, I am still not able to reproduce it :(
image

if you create a new note and just use my markdown here, does it work for you?

- **Daymoji**:
- Will **not work** → ⇒ 
\```dataviewjs
const startOfWeek = moment(dv.current().file.name, 'YYYY-MM-DD - 📆 dddd').isoWeekday("Monday");
const endOfWeek = moment(startOfWeek).add(6, 'days');
let daymojis = {};

for (let day = 0; day <= 6; day++) {
    let currentDate = moment(startOfWeek).add(day, 'days').format("YYYY-MM-DD");
	let fileNamePath = moment(currentDate).format("YYYY-MM-DD - 📆 dddd");
	let fileName = `"` + dv.current().file.folder + "/" + fileNamePath + `"`;
	let dailyNote = dv.pages(fileName);

    if (dailyNote.length > 0) {
        let daymoji = dailyNote[0].Daymoji;
        let weekday = moment(currentDate).format('dddd');
        let icon = "";
        daymojis[weekday] = daymoji ? daymoji + " " + icon : icon;
    }
}

dv.table(
    ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
    [
        [
            daymojis["Monday"] || "",
            daymojis["Tuesday"] || "",
            daymojis["Wednesday"] || "",
            daymojis["Thursday"] || "",
            daymojis["Friday"] || "",
            daymojis["Saturday"] || "",
            daymojis["Sunday"] || ""
        ]
    ]
);
\```
- this will work → ⇒ 

@AngelCrawford
Copy link
Author

if you create a new note and just use my markdown here, does it work for you?

With your Code it worked like it should. So, new research of the culprit.

I removed every part of my markdown in the daily bit after bit. And if I remove the last part, then it works.
But the strange part: If I create a new file, only with the last removed part, then replacing of symbols works like it should.

Could the combination from DataviewJS and Dataview in one note be the problem?

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

No branches or pull requests

3 participants