ijgnd / anki__extended_tag_edit_add_dialog

2 stars 2 forks source link

Not Working - Won't Save/Edit Tags #12

Closed DoctorToBeIn23 closed 1 year ago

DoctorToBeIn23 commented 1 year ago

All Versions from ⁨2.1.56 through 2.1.62 Python 3.9.15 Qt 6.5.0 PyQt 6.5.0 MacBook Pro 13-inch, M1, 2020 macOS Ventura Version 13.2.1

When adding a new tag or editing an existing one in the dialogue box it does not save the tag.

ijgnd commented 1 year ago

Thanks for the report.

Could you describe the exact to reproduce the problem. The way I usually use the add-on I can't reproduce the problem, see this screencast made with 2.1.61qt6 with only the exteneded tag addon installed (with the default config). I used the shortcut Ctrl+t, d

see: https://github.com/ijgnd/temp/blob/main/61_extended_tag_no_error.mkv?raw=true

 

I forgot to upload one change for 2.1.50 or newer. In these versions the option "editor: show filterdialog to add single tag": "Ctrl+t, a" simply had no effect. But this should be a different problem.

Could you try again with the following newer version and report if it works and if it affects the problem you reported: https://github.com/ijgnd/anki__extended_tag_edit_add_dialog/releases/download/2023-04-a/anki__extended_tag_edit_add_dialog__2023-03-25___only_for_50+.ankiaddon

ijgnd commented 1 year ago

@DoctorToBeIn23 just wanted to bring this back to your mind if this slipped your mind. If you are busy at the moment, no problem.

DoctorToBeIn23 commented 1 year ago

Hey sorry I am back. I am still having issues with this I am now testing 2.1.64Qt6. I have noticed its when there are a bunch of tags on the same note. I will try and add a new tag on an empty line with no effect. Also if I try and replace a tag it won't work. It does work with fewer tags on the cards.

DoctorToBeIn23 commented 1 year ago

Jun-01-2023 13-44-21

ijgnd commented 1 year ago

thanks for sharing this.

your screencast really helped.

I can reproduce the problem.

At the moment I suspect that it occurs only under the folloing circumstances:it's the following:

Can you confirm that the bug only occurs under these circumstances?

If you can confirm this, try this:


Open the add-on folder in your addons21 folder. You can do this from the anki add-on dialog. Select my add-on then click the "View Files" button. You might have to navigate to my add-on folder based on the ankiweb addon id which is 1135507717

Inside this folder there's a file named 'tag_dialog_extended__QListWidgetFromDesigner.py'. Open this file in a text editor like VSCode or Apple's TextEdit (in plain text mode) ...

Then change the Line 197 from this:

def accept(self):
    self.tagstring = ""

to

def accept(self):
    current_row = self.form.listWidget.currentRow()
    focus_helper = 0 if current_row != 0 else 1
    self.form.listWidget.setCurrentRow(focus_helper)
    self.tagstring = ""

make sure to keep the indentation level the same with 8 spaces before each new line.

Then save this file and restart Anki.

Does the problem persist?

This is not a good solution but these lines I made for diagnosing the problem also seem to solve it for me.

DoctorToBeIn23 commented 1 year ago

Yes you were correct on everything and I did change the code which solved my issue are you going to push this for everyone? I work for the AnKing team and focus on trying to keep and notify everyone of bugs and on behalf of the team we would appreciate it because so many of the notes in the deck have well over 12 tags per card.

ijgnd commented 1 year ago

I just uploaded this new version. Check for updates and you should get it. If you still run into this problem or another one please let me know and reopen this (or another) issue.

Once more thanks for reporting this serious bug. I didn't notice it because my notes have much fewer tags.

ijgnd commented 1 year ago

@DoctorToBeIn23 : I have an off-topic request. If you use the following add-ons could you test these new versions and let me know if you run into problems with them. Just install them and use them regularly for a week or so.

On github you can't attach .ankiaddon files. So I renamed the files by adding the extension ".zip". After downloading the two files and before adding them to anki just rename them in the Finder/Explorer and remove ".zip"

Thanks.

ankiadd-on_window_search_filter_bar2023-06-11.zip anki__browser_searchquick_insert_tag_deck_notetypeBetterSearch__2023-06-12_22-16.ankiaddon.zip

DoctorToBeIn23 commented 1 year ago

Where is the new uworld add on code? I tried to download it from here but it doesn't show up when I manually put it in the add on folder. https://github.com/AnKing-VIP/uworld_qid_to_anki_search

I will test those other two today.