#8734 closed defect (fixed)
No version "0" for Wiki page "FooPage"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | wiki system | Version: | 0.11.5 |
Severity: | minor | Keywords: | |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to reproduce:
- Search for a non-existing page, i.e. "FooPage" and click button "Create this page."
- From another browser window or another computer (same or different user) do the same, edit the page and click "Submit changes".
- Now, in the first window, whichever button you choose, you will get a Trac Error No version "0" for Wiki page "FooPage".
Attachments (1)
Change History (17)
comment:1 by , 15 years ago
Summary: | No version "0" for Wiki page "NewPage" → No version "0" for Wiki page "FooPage" |
---|
comment:2 by , 15 years ago
Milestone: | → 0.12.1 |
---|---|
Severity: | major → minor |
comment:3 by , 15 years ago
I think that this should rather present the user with a conflict page or at least a conflict notification.
comment:4 by , 15 years ago
See the attached patch for a fix to this defect.
The patch will eventually cause the web_ui to display the usual in-conflict notification message and allows the user to merge in his or her changes.
It basically just removes the special case prior to entering the action handling logic.
by , 15 years ago
Attachment: | issue8734.patch added |
---|
comment:5 by , 15 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:6 by , 15 years ago
The patch would effectively fix the issue in a nice way, but the code removed had some usefulness, see r4369, r4377.
The following is a better fix:
-
trac/wiki/web_ui.py
diff --git a/trac/wiki/web_ui.py b/trac/wiki/web_ui.py
a b class WikiModule(Component): 120 120 req.perm(page.resource).require('WIKI_VIEW') 121 121 req.perm(versioned_page.resource).require('WIKI_VIEW') 122 122 123 if version and versioned_page.version == 0 and \ 124 page.version != 0: 123 if version and versioned_page.version != int(version): 125 124 raise TracError(_('No version "%(num)s" for Wiki page "%(name)s"', 126 125 num=version, name=page.name))
While testing I discovered another issue in the current code, by which the conflict detection code could be by-passed… Not good.
comment:7 by , 15 years ago
Thanks for fixing this.
I wonder if it would not be better to issue a HTTP404 exception instead of simply a TracError exception?
follow-up: 14 comment:9 by , 15 years ago
comment:10 by , 14 years ago
Cc: | added |
---|
comment:12 by , 13 years ago
Cc: | added; removed |
---|
comment:13 by , 12 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Unassigning, as this is not actively worked on.
follow-up: 15 comment:14 by , 10 years ago
follow-up: 16 comment:15 by , 10 years ago
Milestone: | next-minor-0.12.x → 0.12 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to rjollos:
Replying to cboos:
Fixed in r9369. The problem mentioned in comment:6 which involves the
template
argument on concurrent page creation attempts will have to be fixed next before closing.I haven't been able to reproduce any issues with the
template
argument. Do you recall what the issue is?
I always thought that there was still a problem with concurrent wiki page creation, but I can't trigger it anymore either and I can't see in the code what could have been the problem (especially how the use of template
could lead to by-pass the version check). So let's close this as if r9369 would have been the last changeset for this ticket.
comment:16 by , 10 years ago
Replying to cboos:
(especially how the use of
template
could lead to by-pass the version check)
Unless I had at that time already hit the same issue that is described in ticket:7276#comment:6…
Not really of "major" severity, but still a bug. Thanks for the report.