Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12371 closed defect (fixed)

Internal error when ExtendedVersionPlugin is installed

Reported by: Cinc-th Owned by: falkb
Priority: low Component: SimpleMultiProjectPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

When ExtendedVersionPlugin is installed and the user tries to open the Versions page provided by the plugin the following error is shown:

Trac detected an internal error:

KeyError: 'version'

Traceback:


File ".../Python27/lib/site-packages/trac/web/main.py", line 522, in _dispatch_request
  dispatcher.dispatch(req)
File ".../Python27/lib/site-packages/trac/web/main.py", line 254, in dispatch
  self._post_process_request(req, *resp)
File ".../Python27/lib/site-packages/trac/web/main.py", line 363, in _post_process_request
  resp = f.post_process_request(req, *resp)
File "build/bdist.win32/egg/simplemultiproject/version.py", line 157, in post_process_request
  version = data['version']

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by Cinc-th

Resolution: fixed
Status: newclosed

In 14608:

Fixed #12371: make sure key 'version' exists in dict before accessing it otherwise skip.

comment:2 Changed 10 years ago by Cinc-th

ExtendedVersionPlugin uses the base url /versions for the main version page while SimpleMultiProjectPlugin uses /version (note the missing s) for showing versions from within the roadmap page.

This url checks out true during processing because SimpleMultiProjectPlugin checks by using startswith(). SMP gets data from the other plugin while expecting another set of data thus the error.

By checking for the missing key we make sure the right data is used. This is probably not the perfect solution but works for now.

Last edited 10 years ago by Cinc-th (previous) (diff)

comment:3 Changed 10 years ago by Cinc-th

[14609]: use unique key in dict to mark data as valid for SimpleMultiProjectPlugin. Without key skip processing. Better solution than [14608] because no other plugin will ever add this key.

comment:4 Changed 10 years ago by falkb

AFAIK /version is the common URL for versions of a standard Trac system

comment:5 in reply to:  1 Changed 10 years ago by falkb

Replying to Cinc-th:

In 14608:

Fixed #12371: make sure key 'version' exists in dict before accessing it otherwise skip.

Thanks for fixing. Yes, this makes sense. The use of startswith() hits us here... :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain falkb.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.