Closed anareaty closed 3 months ago
I already had this bug on my side… I totally forgot what can cause it.
Maybe it's something around the configuration of sharing key and the repository?
Well, your configuration is wrong:
The plugin seems to struggle to found the folder, create a wrong default path, and explode.
The bug persists if I add the property key:
{ "github": { "branch": "main", "automaticallyMergePR": true, "dryRun": { "enable": false, "folderName": "github-publisher" }, "tokenPath": "%configDir%/plugins/%pluginID%/env", "api": { "tiersForApi": "Github Free/Pro/Team (default)", "hostname": "" }, "workflow": { "commitMessage": "[PUBLISHER] Merge", "name": "" }, "verifiedRepo": true }, "upload": { "behavior": "yaml", "defaultName": "", "rootFolder": "", "yamlFolderKey": "path", "frontmatterTitle": { "enable": false, "key": "" }, "replaceTitle": [], "replacePath": [], "autoclean": { "includeAttachments": false, "enable": true, "excluded": [ "images/" ] }, "folderNote": { "enable": false, "rename": "_index.md", "addTitle": { "enable": false, "key": "title" } }, "metadataExtractorPath": "" }, "conversion": { "hardbreak": false, "dataview": true, "censorText": [], "tags": { "inline": false, "exclude": [], "fields": [] }, "links": { "internal": true, "unshared": true, "wiki": false, "slugify": true } }, "embed": { "attachments": true, "overrideAttachments": [], "keySendFile": [], "notes": true, "folder": "content/images", "convertEmbedToLinks": "bake", "charConvert": "->", "unHandledObsidianExt": [], "sendSimpleLinks": false, "forcePushAttachments": [], "bake": { "textBefore": "", "textAfter": "" } }, "plugin": { "shareKey": "share", "excludedFolder": [], "copyLink": { "enable": false, "links": "", "removePart": [], "transform": { "toUri": true, "slugify": "lower", "applyRegex": [] } }, "setFrontmatterKey": "Set" }, "tabsId": "upload-configuration" }
File:
---
share: true
path: content
---
Text
Try to provide default folder too
How the file can be published into content
if you set no folder?
This setup does not work too:
{ "github": { "branch": "main", "automaticallyMergePR": true, "dryRun": { "enable": false, "folderName": "github-publisher" }, "tokenPath": "%configDir%/plugins/%pluginID%/env", "api": { "tiersForApi": "Github Free/Pro/Team (default)", "hostname": "" }, "workflow": { "commitMessage": "[PUBLISHER] Merge", "name": "" }, "verifiedRepo": true }, "upload": { "behavior": "yaml", "defaultName": "content", "rootFolder": "content", "yamlFolderKey": "path", "frontmatterTitle": { "enable": false, "key": "" }, "replaceTitle": [], "replacePath": [], "autoclean": { "includeAttachments": false, "enable": true, "excluded": [ "images/" ] }, "folderNote": { "enable": false, "rename": "_index.md", "addTitle": { "enable": false, "key": "title" } }, "metadataExtractorPath": "" }, "conversion": { "hardbreak": false, "dataview": true, "censorText": [], "tags": { "inline": false, "exclude": [], "fields": [] }, "links": { "internal": true, "unshared": true, "wiki": false, "slugify": true } }, "embed": { "attachments": true, "overrideAttachments": [], "keySendFile": [], "notes": true, "folder": "content/images", "convertEmbedToLinks": "bake", "charConvert": "->", "unHandledObsidianExt": [], "sendSimpleLinks": false, "forcePushAttachments": [], "bake": { "textBefore": "", "textAfter": "" } }, "plugin": { "shareKey": "share", "excludedFolder": [], "copyLink": { "enable": false, "links": "", "removePart": [], "transform": { "toUri": true, "slugify": "lower", "applyRegex": [] } }, "setFrontmatterKey": "Set" }, "tabsId": "upload-configuration" }
Please reply to my question…
What do you mean I set no folder? I set the "content" folder in the "path" variable. Also I should mention that everithing is published just fine if I turn off "Auto clean up" option. And also everything worked in some older realises. But trying to publish the file after the latest uplate wiped all my older published files.
For the second test, did you remove the path
from the frontmatter?
Could you please active the developper logs and check what happens ?
The option is in the end of the last tab option
No, I did not remove the path from the frontmatter. Here are the logs:
[Enveloppe](GithubBranch.newBranchOnRepo):
Branch successfully created (status: 201) on anareaty/paperless-forest
plugin:obsidian-mkdocs-publisher:175 DEV LOGS [19:16:28.184] GithubBranch.publish:
Publishing file: Test-note.md
plugin:obsidian-mkdocs-publisher:175 DEV LOGS [19:16:28.191] GithubBranch.publish:
Publishing Test-note.md to [anareaty/paperless-forest/main]
plugin:obsidian-mkdocs-publisher:175 [Enveloppe](GithubBranch.uploadOnMultipleRepo):
Upload Test-note.md:content/Test-note.md on anareaty/paperless-forest:Test-plugins-7-5-2024
plugin:obsidian-mkdocs-publisher:22
GET https://api.github.com/repos/anareaty/paperless-forest/contents/content%2FTest-note.md?ref=Test-plugins-7-5-2024 404 (Not Found)
fetchWrapper @ plugin:obsidian-mkdocs-publisher:22
request2 @ plugin:obsidian-mkdocs-publisher:22
hook @ plugin:obsidian-mkdocs-publisher:24
eval @ plugin:obsidian-mkdocs-publisher:6
Promise.then (async)
register @ plugin:obsidian-mkdocs-publisher:6
Object.assign.endpoint @ plugin:obsidian-mkdocs-publisher:22
upload @ plugin:obsidian-mkdocs-publisher:39
uploadText @ plugin:obsidian-mkdocs-publisher:39
uploadOnMultipleRepo @ plugin:obsidian-mkdocs-publisher:39
await in uploadOnMultipleRepo (async)
publish @ plugin:obsidian-mkdocs-publisher:39
await in publish (async)
shareOneNote @ plugin:obsidian-mkdocs-publisher:27
await in shareOneNote (async)
checkCallback @ plugin:obsidian-mkdocs-publisher:27
RK @ app.js:1
t.onChooseItem @ app.js:1
t.onChooseSuggestion @ app.js:1
t.selectSuggestion @ app.js:1
e.useSelectedItem @ app.js:1
e.onSuggestionClick @ app.js:1
s @ enhance.js:1
plugin:obsidian-mkdocs-publisher:175 DEV LOGS [19:16:28.648] GithubBranch.upload:
The 404 error is normal ! It means that the file does not exist yet. Don't worry ❤️.
plugin:obsidian-mkdocs-publisher:175 [Enveloppe](deleteFromGithubOneRepo):
trying to delete file : content/Test-note.md from anareaty/paperless-forest
Okay the bug seems to happens in the last version of the plugin
Sorry for the delay, I was pretty tired. The commit dd2aad5 added this bug so reverting should fix it.
Should be fixed in 7.2.11. Sorry again
Sorry to add a comment to the closed. I'm still having this bug pop up with the updated plugin 7.2.11. This is generated when using upload current active note, and none of the "edited" notes are actually edited in this context. Is there a workaround you might suggest, or a "cache clear" option I can try?
Please open a new issue.
Issue validation
Command used
Upload single current active note
Plugin version
7.2.10
Describe the bug
When I tried to upload a new note, nothing is added, but instead all notes that was already uploaded were deleted from repository. Trying to reupload any file, I get the message that it is added and deleted at the same time. I tried to publish some new notes and noticed that sometimes the new note uploads when you publish in the first time, but gets deleted when you try to reupload it again. Sometimes it doesn't work even the first time.
How to reproduce ?
Minimal Reproducible Example
Relevant log output
OS
No response
Anything else?
When trying to upload the note I got this message:
Obsidian information