[Zotero 7 Beta] Broken "Create Book Section"

edited July 21, 2024
I have added a book section from the right-click menu "Create Book Section". The book already had 16 chapters as separate items added as Related items. The chapters are only related to the book, not to the other chapters. Just after adding the new book section, all the other chapters were modified (the "Date Modified" was updated). I am not sure what was modified. I have then deleted the Related link and deleted the newly added book section. But I am left with a broken Related section for all items. I cannot expand it, as mentioned in this other post:
https://forums.zotero.org/discussion/116040/expanding-related-in-windows-standalone

https://s3.amazonaws.com/zotero.org/images/forums/u265723/qs2wswz9jnbulnmg4xeq.png

The number of related items is not the real number of related items for this item. It just depends on the number of related items that the item previously selected has:

https://s3.amazonaws.com/zotero.org/images/forums/u265723/a8eghlauvffn1crk4ofk.png

There are probably multiple bugs happening here:
- Adding a book section relates the new book section to all other existing book sections. I understand that it should not do that:
https://github.com/zotero/zotero/issues/2757
- Deleting an item still displays the deleted item in the Related section of the Item Pane
- ... some other bugs explaining the broken Related section...
I can probably investigate further if needed when these first bugs are solved.

Edit: Here are the steps to reproduce the main bug:
1) Create a new book item
2) Add a book section from the right-click menu "Create Book Section"
3) Delete the book section that was just added
4) Empty the Bin
5) Click on an item with 16 related items
6) Click on the newly added book
-> It indicates 16 related items, but it does not have any in reality, and the Related section cannot be expanded

https://s3.amazonaws.com/zotero.org/images/forums/u265723/3s49pxh6norzebe6o40f.png

Zotero 7.0.0-beta.104+7e01a7d0e (64-bit)
Windows 10
  • edited July 22, 2024
    I have realised that the steps above (1 to 6) do not work all the time.
    Here is a Debug ID to reproduce:
    The Debug ID is D1722105927.

    The relevant errors seem to be:
    [JavaScript Error: "TypeError: item.getDisplayTitle is not a function" {file: "chrome://zotero/content/elements/relatedBox.js" line: 106}]

    [JavaScript Error: "TypeError: relatedItem.getItemTypeIconName is not a function" {file: "chrome://zotero/content/elements/relatedBox.js" line: 123}]
    I do not have strong evidence yet, but it seems to trigger the bug only when the option "Sync automatically" is enabled.

    After creating the broken item, it remains broken even after restarting Zotero. Here is a debug ID for simply selecting the item in the Items Tree:
    Debug ID: D1499366121
    [JavaScript Error: "TypeError: relatedItem.getItemTypeIconName is not a function" {file: "chrome://zotero/content/elements/relatedBox.js" line: 123}]

    [...]

    (3)(+0059056): Viewing item

    (3)(+0000026): Refreshing item box

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

    (3)(+0000000): Reloading tags box

    (2)(+0000001): Related item 1/Q23IFQLP not found for item 1/X2VT3ZUL
    So it seems that something went wrong when deleting the related items created by the "Create Book Section".

    Anyone else can reproduce?

    Zotero 7.0.0-beta.105+c5c613c82 (64-bit)
    Windows 10
  • The bug now appears more clearly in the new beta: the Related section does not show the same number of related items as listed, but the number does not change depending on the last selected item:

    https://s3.amazonaws.com/zotero.org/images/forums/u265723/qwvv0m5o8si2d6yvb0j6.png

    https://s3.amazonaws.com/zotero.org/images/forums/u265723/aw50ftrbh87u0lm7447h.png

    Zotero 7.0.0-beta.107+2917f41cb (64-bit)
    Windows 10
Sign In or Register to comment.