windingwind / zotero-pdf-translate

Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
GNU Affero General Public License v3.0
7.67k stars 359 forks source link

[Bug] The side bar keeps disappearing and the translation window keeps the previous text #1022

Closed baltzis closed 1 week ago

baltzis commented 1 week ago

Is there an existing issue for this?

Have you checked the FAQ (https://github.com/windingwind/zotero-pdf-translate/issues/6)?

Are you using the latest Zotero and the latest plugin?

Environment

Describe the bug

The translator sidebar has disappeared. No option to translate the item title, abstract, etc. The popup window keeps the previously translated text and there seems to be no way to clear it and update the contents with the translation of the newly selected text.

Debug Output

[JavaScript Error: "TypeError: Zotero.ItemTreeManager.registerColumn is not a function" {file: "jar:file:///C:/Users/baltz/AppData/Roaming/Zotero/Zotero/Profiles/n86q967z.default/extensions/zoteropdftranslate@euclpts.com.xpi!/chrome/content/scripts/zoteropdftranslate.js" line: 15319}]

[JavaScript Error: "uncaught exception: undefined"]

appName => Zotero, version => 7.0.9 (x64), os => Windows 11 22631, locale => el-GR, extensions => Translate for Zotero (2.0.9, extension), Actions and Tags for Zotero (2.0.5, extension, disabled)

(3)(+0030475): Starting full-text content processor

(4)(+0000000): Registering notifier observer 'fulltext_1v' for [sync]

(3)(+0007966): [Translate for Zotero] runTranslationTask {}

(3)(+0000001): [Translate for Zotero] try auto detect language

(3)(+0000000): [Translate for Zotero] try itemLanguage en

(3)(+0000001): [Translate for Zotero] use autoDetect en

(3)(+0000000): [Translate for Zotero] {"id":"6YFDHrUb-1732385175892","type":"text","raw":"This approach, which, in its most caricatural forms, subordinates the writer or artist to the constraints","result":"","audio":[],"service":"deeplx","candidateServices":[],"itemId":4241,"status":"processing","extraTasks":[],"langfrom":"en","langto":"el-GR","callerID":"zoteropdftranslate@euclpts.com","secret":""}

(3)(+0000000): HTTP POST "{"jsonrpc":"2.0","method" : "LMT_handle_texts","id":8396912001,"params":{"texts":[{"text":"This approach, which, in its most caricatural forms, subordinates the writer or artist to the constraints","requestAlternatives":3}],"splitting":"newlines","lang":{"source_lang_user_selected":"EN","target_lang":"EL"},"timestamp":1732385175900,"commonJobParams":{"wasSpoken":false,"transcribe_as":""}}}" to https://www2.deepl.com/jsonrpc

(3)(+0000517): HTTP POST https://www2.deepl.com/jsonrpc succeeded with 200

(3)(+0009987): Notifier.trigger('select', 'tab', [tab-nDoYbfoF], {"tab-nDoYbfoF":{"type":"reader-loading"}}) called [observers: 6]

(4)(+0000005): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3153, '']

(3)(+0000001): Notifier.trigger('load', 'tab', [tab-nDoYbfoF], {"tab-nDoYbfoF":{"id":"tab-nDoYbfoF","type":"reader","title":"Mais qui a créé les « créateurs » ? - Bourdieu - 2002","data":{"itemID":3272,"icon":"attachmentPDF","secondViewState":null},"timeSelected":1732385186,"prevType":"reader-loading"}}) called [observers: 6]

(4)(+0000014): Registering notifier observer 'paneHeader_9q' for [item]

(4)(+0000003): Registering notifier observer 'itemBox_2N' for [item]

(4)(+0000012): Registering notifier observer 'abstractBox_lL' for [item]

(4)(+0000001): Registering notifier observer 'attachmentsBox_Td' for [item]

(4)(+0000000): Registering notifier observer 'notesBox_6k' for [item]

(4)(+0000005): Registering notifier observer 'tagsBox_Hy' for [item-tag,setting] with priority 101

(4)(+0000001): Registering notifier observer 'relatedbox_lQ' for [item]

(4)(+0000000): Registering notifier observer 'noteEditor_k0' for [item,file]

(4)(+0000000): Registering notifier observer 'attachmentbox_KM' for [item]

(4)(+0000000): Registering notifier observer 'attachmentAnnotationsBox_ce' for [item]

(4)(+0000002): Registering notifier observer 'librariesCollectionsBox_LJ' for [item,collection]

(4)(+0000000): Registering notifier observer 'tagsBox_NB' for [item-tag,setting] with priority 101

(4)(+0000001): Registering notifier observer 'relatedbox_pc' for [item]

(4)(+0000000): Registering notifier observer 'ItemDetails_dd' for [item,itempane,tab]

(3)(+0000000): Viewing item

(3)(+0000005): Refreshing item box

(3)(+0000031): Setting mode to 'edit'

(3)(+0000001): Reloading tags box

(3)(+0000006): Viewing item

(3)(+0000001): Refreshing item box

(3)(+0000000): Setting mode to 'edit'

(4)(+0000002): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3153, '']

(4)(+0000000): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3153, '']

(3)(+0000034): Refreshing item box

(3)(+0000004): Getting contents of C:\Users\baltz\Zotero\storage\M4EQIWHA.zotero-reader-state

(3)(+0000102): BlockingObserver: Added observer

(4)(+0000009): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3153, '']

(3)(+0000196): Got MIME type application/pdf from extension 'pdf'

(3)(+0000076): itemTree.render(). Displaying Item Tree

(3)(+0005720): Writing reader state to C:\Users\baltz\Zotero\storage\M4EQIWHA.zotero-reader-state

(3)(+0000852): [Translate for Zotero] runTranslationTask {}

(3)(+0000001): [Translate for Zotero] {"id":"6YFDHrUb-1732385175892","type":"text","raw":"This approach, which, in its most caricatural forms, subordinates the writer or artist to the constraints J'évoquerai à peine la tradition de Luckacs et Goldmann, qui s'efforce de mettre en relation le contenu de l'œuvre littéraire et les caractéristiques sociales de la classe ou de la fraction de classe qui est censée en être le destinataire privilégié","result":"","audio":[],"service":"deeplx","candidateServices":[],"itemId":4241,"status":"processing","extraTasks":[],"langfrom":"en","langto":"el-GR","callerID":"zoteropdftranslate@euclpts.com","secret":""}

(3)(+0000001): HTTP POST "{"jsonrpc":"2.0","method" : "LMT_handle_texts","id":8378605001,"params":{"texts":[{"text":"This approach, which, in its most caricatural forms, subordinates the writer or artist to the constraints J'évoquerai à peine la tradition de Luckacs et Goldmann, qui s'efforce de mettre en relation le contenu de l'œuvre littéraire et les caractéristiques sociales de la classe ou de la fraction de classe qui est censée en être le destinataire privilégié","requestAlternatives":3}],"splitting":"newlines","lang":{"source_lang_user_selected":"EN","target_lang":"EL"},"timestamp":1732385193504,"commonJobParams":{"wasSpoken":false,"transcribe_as":""}}}" to https://www2.deepl.com/jsonrpc

(3)(+0000794): HTTP POST https://www2.deepl.com/jsonrpc succeeded with 200

(3)(+0004603): Getting contents of C:\Users\baltz\AppData\Roaming\Zotero\Zotero\Profiles\n86q967z.default\treePrefs.json

(3)(+0000001): Writing column prefs of length 8898 to file C:\Users\baltz\AppData\Roaming\Zotero\Zotero\Profiles\n86q967z.default\treePrefs.json

(3)(+0022426): HTTP POST "error=true&errorData=%5BJavaScript%20Error%3A%20%22TypeError%3A%20Zotero.ItemTreeManager.registerColumn%20is%20not%20a%20function%22%20%7Bfile%3A%20%22jar%3Afile%3A%2F%2F%2FC%3A%2FUsers%2Fbaltz%2FAppData%2FRoaming%2FZotero%2FZotero%2FProfiles%2Fn86q967z.default%2Fextensions%2Fzoteropdftranslate%40euclpts.com.xpi!%2Fchrome%2Fcontent%2Fscripts%2Fzoteropdftranslate.js%22%20line%3A%2015319%7D%5D%0A%5BJavaScript%20Error%3A%20%22uncaught%20exception%3A%20undefined%22%5D&extraData=&diagnostic=appName%20%3D%3E%20Zotero%2C%20version%20%3D%3E%207.0.9%20(x64)%2C%20os%20%3D%3E%20Windows%2011%2022631%2C%20locale%20%3D%3E%20el-GR%2C%20extensions%20%3D%3E%20Translate%20for%20Zotero%20(2.0.9%2C%20extension)%2C%20Actions%20and%20Tags%20for%20Zotero%20(2.0.5%2C%20extension%2C%20disabled)" to https://repo.zotero.org/repo/report

(3)(+0000218): HTTP POST https://repo.zotero.org/repo/report succeeded with 200

Anything else?

I am not sure that I managed to record the debug output correctly, as I have never done this before, and I am not an expert.

github-actions[bot] commented 1 week ago

:rocket: This ticket has been resolved in v2.0.11. See Release v2.0.11 for release notes.