Open cassie-zhu opened 5 years ago
I just installed wiki.js verision 1.0.102 and had the same issue: when I confirmed the delete-dialog, a red x showed up in the top right corner, but the dialog stays and the page is not deleted.
The xhr-request results in a status code 200 with the following response body:
{
"ok":false,
"error":"`git --git-dir=repo/.git --work-tree=repo rm firewall.md` failed with code 1"
}
There is also no error message as to why the delete operation was not successful.
The git-command when executed via the terminal has in turn the following error message:
$ git --git-dir=repo/.git --work-tree=repo rm firewall.md
error: the following file has changes staged in the index:
firewall.md
(use --cached to keep the file, or -f to force removal)
It means that there are uncommitted changes in the git repo.
Explanation
This is linked to the fact that I did not configure a git repository as a backup. While commits should be made anyways when creating or editing a wiki page, I see that this is a problem because git wants you to set your account's default identity, before letting you commit. Thus, changes are made but not committed.
Possible Solution
This could be solved by deferring the git init
command for when the user actually wants to configure a git integration.
I have the same issue without having a git repo configured. Is there any workaround to delete a page?
@FlonTaut Delete the page from ./repo
and restart wiki.js
I think we should fix by make system call the command "git --git-dir=repo/.git --work-tree=repo rm firewall.md" with "-f" to force delete page when we didn't config for git repo
Actual behavior
Expected behavior
delete success
Steps to reproduce the behavior