Collection contextual actions often don't work

edited July 12, 2017
Since Zotero 5.01 beta, right-clicking a collection > 'new subcollection' often does nothing. As in, no prompt appears to create new. 'Rename collection' / 'delete collection' in the same context menu also fails to work.

Demo gif: http://i.imgur.com/dsWq2Ed.gif

However, left click then right click quickly afterwards on a collection does the trick.

Thoughts: It seems that Collection Selection is not being correctly updated in all cases.

See below console output when it fails:
version => 5.0.2, platform => MacIntel, oscpu => Intel Mac OS X 10.12, locale => en-US, appName => Zotero, appVersion => 5.0.2, extensions => ZotFile (5.0.0b3, extension), Zotero Word for Mac Integration (5.0.1.SA.5.0.2, extension), Zotero LibreOffice Integration (5.0.3.SA.5.0.2, extension, disabled)

=========================================================

(4)(+0011915): Unregistering notifier observer in notifier with id 'itemTreeView_LD'

(3)(+0000000): Setting tree for C86 items view 19xCBgXE

(3)(+0000001): Creating items view with id 7VSlEpAc

(3)(+0000001): Setting tree for C102 items view 7VSlEpAc

(3)(+0000003): Refreshing items list for 7VSlEpAc

(4)(+0000012): CREATE TEMPORARY TABLE tmpSearchResults_SfWvl6Y2 AS SELECT itemID FROM items WHERE (itemID NOT IN (SELECT itemID FROM deletedItems) AND itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems))) AND (itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL)) AND itemID IN (SELECT itemID FROM items WHERE (libraryID=?)) AND itemID IN (SELECT itemID FROM collectionItems WHERE (collectionID IN (102))) [1]

(4)(+0000015): CREATE INDEX tmpSearchResults_SfWvl6Y2_itemID ON tmpSearchResults_SfWvl6Y2(itemID)

(4)(+0000001): SELECT GROUP_CONCAT(itemID) FROM items WHERE itemID IN (SELECT itemID FROM items WHERE (itemID NOT IN (SELECT itemID FROM deletedItems) AND itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)))) AND (itemID IN (SELECT itemID FROM tmpSearchResults_SfWvl6Y2) OR itemID IN (SELECT itemID FROM itemAttachments WHERE parentItemID IN (SELECT itemID FROM tmpSearchResults_SfWvl6Y2)) OR itemID IN (SELECT itemID FROM itemNotes WHERE parentItemID IN (SELECT itemID FROM tmpSearchResults_SfWvl6Y2)))

(4)(+0000004): DROP TABLE IF EXISTS tmpSearchResults_SfWvl6Y2

(3)(+0000003): Sorting items list by itemType, firstCreator, date, title, dateAdded ascending for 4 items

(3)(+0000001): Sorted 4 items in 2 ms

(3)(+0000000): Refreshed open parents in 0 ms

(3)(+0000001): Updating tag selector with current tags

(4)(+0000001): SELECT DISTINCT name AS tag, type FROM itemTags JOIN tags USING (tagID) WHERE itemID IN ([...5])

(3)(+0000001): Refreshing tags selector

(3)(+0000002): Sorting tags

(3)(+0000000): Sorted tags in 0 ms

(3)(+0000001): Loaded tag selector in 3 ms

(3)(+0000003): Set tree for items view 7VSlEpAc in 48 ms
When it succeeds via the rename-textbox hack:
version => 5.0.2, platform => MacIntel, oscpu => Intel Mac OS X 10.12, locale => en-US, appName => Zotero, appVersion => 5.0.2, extensions => ZotFile (5.0.0b3, extension), Zotero Word for Mac Integration (5.0.1.SA.5.0.2, extension), Zotero LibreOffice Integration (5.0.3.SA.5.0.2, extension, disabled)

=========================================================

(3)(+0009095): Collection selection hasn't changed

(4)(+0000829): Collection 102 has not changed

(3)(+0001472): Collection selection hasn't changed

(4)(+0000506): Collection 102 has not changed

(3)(+0001326): Collection selection hasn't changed

(4)(+0000834): Collection 102 has not changed

(4)(+0000931): SELECT SUBSTR(collectionName, 9) FROM collections WHERE libraryID=? AND collectionName LIKE ? ORDER BY collectionName [1, 'Untitled%']

(4)(+0003621): Saving data for new collection to database

(4)(+0000000): Beginning DB transaction v3QGnw3x

(3)(+0000037): Saving collection 137

(4)(+0000001): INSERT INTO collections (collectionID, libraryID, key, clientDateModified, collectionName, parentCollectionID) VALUES (?,?,?,?,?,?) [137, 1, '8E8K5W48', '2017-07-12 09:04:24', 'Test', 102]

(3)(+0000005): Notifier.trigger('add', 'collection', [137], {}) queued

(3)(+0000001): Loading primaryData for 1 collection in My Library

(4)(+0000001): SELECT O.collectionID, O.collectionName AS name, O.libraryID, O.key, O.version, O.synced, O.parentCollectionID AS parentID, CP.key AS parentKey, (SELECT COUNT(*) FROM collections WHERE parentCollectionID=O.collectionID) != 0 AS hasChildCollections, (SELECT COUNT(*) FROM collectionItems WHERE collectionID=O.collectionID) != 0 AS hasChildItems FROM collections O LEFT JOIN collections CP ON (O.parentCollectionID=CP.collectionID) WHERE 1 AND O.libraryID=? AND O.collectionID IN (137) [1]

(3)(+0000003): Loaded primaryData in My Library in 4 ms

(4)(+0000001): SELECT COUNT(*)>0 FROM collections WHERE libraryID=? [1]

(4)(+0000002): Committed DB transaction v3QGnw3x

(3)(+0000001): Committing notifier event queue [add-collection: 1]

(3)(+0000000): Notifier.trigger('add', 'collection', [137], {"137":{}}) called [observers: 3]

(4)(+0000007): Unregistering notifier observer in notifier with id 'itemTreeView_k0'

(3)(+0000000): Setting tree for C102 items view 2FSt5ouD

(3)(+0000000): Creating items view with id TXs4zxkC

(3)(+0000001): Setting tree for C137 items view TXs4zxkC

(3)(+0000003): Refreshing items list for TXs4zxkC

(3)(+0000008): Setting auto-sync timeout to 15 seconds

(4)(+0000002): CREATE TEMPORARY TABLE tmpSearchResults_MM61GDWp AS SELECT itemID FROM items WHERE (itemID NOT IN (SELECT itemID FROM deletedItems) AND itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems))) AND (itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL)) AND itemID IN (SELECT itemID FROM items WHERE (libraryID=?)) AND itemID IN (SELECT itemID FROM collectionItems WHERE (collectionID IN (137))) [1]

(4)(+0000013): CREATE INDEX tmpSearchResults_MM61GDWp_itemID ON tmpSearchResults_MM61GDWp(itemID)

(4)(+0000001): SELECT GROUP_CONCAT(itemID) FROM items WHERE itemID IN (SELECT itemID FROM items WHERE (itemID NOT IN (SELECT itemID FROM deletedItems) AND itemID NOT IN (SELECT itemID FROM itemNotes WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)) AND itemID NOT IN (SELECT itemID FROM itemAttachments WHERE parentItemID IS NOT NULL AND parentItemID IN (SELECT itemID FROM deletedItems)))) AND (itemID IN (SELECT itemID FROM tmpSearchResults_MM61GDWp) OR itemID IN (SELECT itemID FROM itemAttachments WHERE parentItemID IN (SELECT itemID FROM tmpSearchResults_MM61GDWp)) OR itemID IN (SELECT itemID FROM itemNotes WHERE parentItemID IN (SELECT itemID FROM tmpSearchResults_MM61GDWp)))

(4)(+0000003): DROP TABLE IF EXISTS tmpSearchResults_MM61GDWp

(3)(+0000001): Refreshed open parents in 0 ms

(3)(+0000002): Updating tag selector with current tags

(3)(+0000000): Refreshing tags selector

(3)(+0000001): Sorting tags

(3)(+0000001): Sorted tags in 1 ms

(3)(+0000001): Loaded tag selector in 3 ms
  • edited July 12, 2017
    I think it's just the difference between right-click->hold->release and right-click->release->left-click, no?

    If I right-click and hold, it doesn't work.

    We'll look into it — thanks.
  • You've hit the nail on the head - it never even occurred to me that these were different actions. I'm too naturalised. Yes, it's holding right click which messes things up.
Sign In or Register to comment.