Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3430 closed defect (fixed)

Incorrent value passed in URL to diff action

Reported by: tomek.piatek@… Owned by: Christian Boos
Priority: high Milestone: 0.10
Component: wiki system Version: devel
Severity: normal Keywords: diff
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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
  2. Click on Index by Date in the secondary nav bar
  3. Click any of the diff links
  4. 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

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 18 years ago

Component: generalwiki
Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos

It seems to be a database issue, related to the use of MAX(version) in the RecentChange macro.

It works fine for me, using PySqlite 2.2.1 on Windows. What database backend and version are you using?

comment:2 by Christian Boos, 18 years ago

Resolution: fixed
Status: newclosed

r3531 should be enough to fix the issue. Please reopen if this is not the case.

comment:3 by anonymous, 18 years ago

Turns out it was my fault. My bad. Sorry for raising a fals alarm and thanks for not getting too angry with me.

I'm running Trac on a Debian box. Part of the problem was that I installed Python2.4 but I didn't upgrade all the necessary packages.

comment:4 by Christian Boos, 18 years ago

Just for the sake of curiosity, I'm nevertheless interested to know what database driver (and version) you were using, in case a similar problem arise again.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.