Zim

Tags plugin popup menu has invalid options

Bug #1490259 reported by Pl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Unassigned

Bug Description

Clicking on some options in the popup menu in Tags Plugin window causes error.

How to reproduce:
Choose option 'sort pages by tags' in tags window, you will have list of tags with sub-pages.
Click on any tag name and choose in the popup menu an option like 'Open in New Window', 'Rename Page...', etc.
Since such page doesn't exist this will cause error.

Tags plugin uses default popup menu with all available items. The solution could be to introduce additional check whether this element is valid or not - see patch for example.

======= Traceback =======
  File "...\zim\gui\__init__.py", line 913, in _action_handler
    method(*arg)
  File "...\zim\gui\__init__.py", line 1514, in open_new_window
    PageWindow(self, page).show_all()
  File "...\zim\gui\__init__.py", line 3063, in __init__
    page = ui.notebook.get_page(page)
  File "...\zim\notebook.py", line 1346, in get_page
    page = store.get_page(path)
  File "...\zim\stores\files.py", line 73, in get_page
    file = self._get_file(path)
  File "...\zim\stores\files.py", line 55, in _get_file
    assert path != self.namespace, 'Can not get a file for the toplevel namespace'
AssertionError: Can not get a file for the toplevel namespace

Revision history for this message
Pl (plprgt) wrote :
description: updated
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fix in rev 775

Changed in zim:
status: New → Fix Committed
Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.