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

delete bug #14

Closed
Summittk opened this issue Nov 18, 2022 · 12 comments
Closed

delete bug #14

Summittk opened this issue Nov 18, 2022 · 12 comments

Comments

@Summittk
Copy link

Folders still exist in the right-click Add category.

@redleafnew
Copy link
Owner

Folders deletion is not supported.

@Summittk
Copy link
Author

I used your plugin to select Delete all attachments and items in the Delete folder operation, but the folder still exists in the zotero right-click menu

@redleafnew
Copy link
Owner

redleafnew commented Nov 18, 2022

image
Do you mean the collection CP still exist aftert this operation here?

@Summittk
Copy link
Author

I have these folders in my libraryimage
but in the option of Add the category, The previously deleted folder still exists.
image

@Summittk
Copy link
Author

Can you help me solve this bug, which affects the experience and collaboration with zotero connect plugin. Thank you very much.

@redleafnew
Copy link
Owner

了解了,我看看。

@redleafnew
Copy link
Owner

找到可以删除文件夹的函数了,但以前还不知道怎么清除。
https://groups.google.com/g/zotero-dev/c/vELyCA2oMeY

@Summittk
Copy link
Author

能帮忙找一下找到分类文件夹存放位置,我感觉就能删干净。

@redleafnew
Copy link
Owner

redleafnew commented Nov 18, 2022

清空delitem 0.0.20之前版本删除分类(文件夹)后残留在Add to Colletions中分类(文件夹)

方法1(优先使用):

var collections = Zotero.Collections.getByLibrary(Zotero.Libraries.userLibraryID);
collections[1].deleted = true
collections[1].saveTx()
return collections[1]

deleted_collections = collections.filter(x => x.deleted === true);
for (coll of deleted_collections){
    coll.eraseTx()
}
return deleted_collections.length + ' deleted collection(s) has(have) been removed.'

方法2(谨慎使用):
感谢
@l0o0提供的方法。

直接修改数据库文件,非常危险,一定要备份数据目录。

  1. 备份数据目录(数据目录位置查看)
    image

  2. https://github.com/sqlitebrowser/sqlitebrowser/releases下载DB Browser for SQLite,运行DB Browser for SQLite

  3. 关闭Zotero,用DB Browser for SQLite打开自己数据目录内的zotero.sqlite文件

image
image

  1. 点击浏览数据--表后面的collections--选中下面的记录--右击--删除记录

image
5. 关闭数据库,并保存。

image
image

@Summittk
Copy link
Author

大佬牛逼,成功解决,十分感谢!希望你也能修复一下这个bug,感恩!

@redleafnew
Copy link
Owner

@Summittk
Copy link
Author

可以的,没问题了

redleafnew pushed a commit that referenced this issue Jan 25, 2023
…ld-0.16.10

build(deps-dev): bump esbuild from 0.15.18 to 0.16.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants