#3430: Incorrent value passed in URL to diff action
------------------------------------+---------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  jonas
     Type:  defect                  |      Status:  new  
 Priority:  high                    |   Milestone:       
Component:  general                 |     Version:  devel
 Severity:  normal                  |    Keywords:  diff 
------------------------------------+---------------------------------------
 I'm running trac r3530 (trunk)

 '''Problem:'''

 Trac thorws an error when trying to see a "diff" between two versions of a
 wiki page.

 '''Steps to reproduce:'''

   1. Click on ''Wiki'' in the main nav bar
   1. Click on ''Index by Date'' in the secondary nav bar
   1. Click any of the ''diff'' links
   1. You will get the following error:

 '''Python Traceback:'''
 {{{
 Traceback (most recent call last):
   File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 315, in
 dispatch_request
     dispatcher.dispatch(req)
   File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 200, in
 dispatch
     resp = chosen_handler.process_request(req)
   File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 97, in
 process_request
     page = WikiPage(self.env, pagename, version, db)
   File "/usr/lib/python2.4/site-packages/trac/wiki/model.py", line 32, in
 __init__
     self._fetch(name, version, db)
   File "/usr/lib/python2.4/site-packages/trac/wiki/model.py", line 48, in
 _fetch
     (name, int(version)))
 ValueError: invalid literal for int(): 1.0
 }}}

 '''Workaround:'''

 Use ''Timeline'' to achieve the same task.

 '''Cause:'''

 You'll notice that URLs for the ''diff'' links on the ''Timeline'' page
 looks like this:
 {{{
 http://.../wiki/ZmsJavascriptApi?action=diff&version=2
 }}}

 And the corresponding URL on the ''index by Date'' page looks like this:
 {{{
 http://.../wiki/ZmsJavascriptApi?action=diff&version=2.0
 }}}

 The difference is that in the first case version is '''2''' and in the
 second case version is '''2.0'''

-- 
Ticket URL: <http://trac.edgewall.org/ticket/3430>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to