#3430 closed defect (fixed)
Incorrent value passed in URL to diff action
Reported by: | 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:
- Click on Wiki in the main nav bar
- Click on Index by Date in the secondary nav bar
- Click any of the diff links
- 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 , 18 years ago
Component: | general → wiki |
---|---|
Milestone: | → 0.10 |
Owner: | changed from | to
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
r3531 should be enough to fix the issue. Please reopen if this is not the case.
comment:3 by , 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 , 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.
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?