Edgewall Software
Modify

Opened 15 years ago

Closed 10 years ago

Last modified 10 years ago

#8734 closed defect (fixed)

No version "0" for Wiki page "FooPage"

Reported by: g.burgstaller@… 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:

  1. Search for a non-existing page, i.e. "FooPage" and click button "Create this page."
  1. From another browser window or another computer (same or different user) do the same, edit the page and click "Submit changes".
  1. Now, in the first window, whichever button you choose, you will get a Trac Error No version "0" for Wiki page "FooPage".

Attachments (1)

issue8734.patch (633 bytes ) - added by Carsten Klein <carsten.klein@…> 15 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 by anonymous, 15 years ago

Summary: No version "0" for Wiki page "NewPage"No version "0" for Wiki page "FooPage"

comment:2 by Remy Blank, 15 years ago

Milestone: 0.12.1
Severity: majorminor

Not really of "major" severity, but still a bug. Thanks for the report.

comment:3 by Carsten Klein <carsten.klein@…>, 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 Carsten Klein <carsten.klein@…>, 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 Carsten Klein <carsten.klein@…>, 15 years ago

Attachment: issue8734.patch added

comment:5 by Carsten Klein <carsten.klein@…>, 15 years ago

Owner: set to anonymous
Status: newassigned

comment:6 by Christian Boos, 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):  
    120120        req.perm(page.resource).require('WIKI_VIEW')
    121121        req.perm(versioned_page.resource).require('WIKI_VIEW')
    122122
    123         if version and versioned_page.version == 0 and \
    124                page.version != 0:
     123        if version and versioned_page.version != int(version):
    125124            raise TracError(_('No version "%(num)s" for Wiki page "%(name)s"',
    126125                              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 Carsten Klein <carsten.klein@…>, 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?

comment:8 by Christian Boos, 15 years ago

Could be a ResourceNotFound error, yes.

comment:9 by Christian Boos, 15 years ago

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.

comment:10 by Thijs Triemstra <lists@…>, 14 years ago

Cc: lists@… added

comment:11 by AdrianFritz, 14 years ago

#7276 looks like related

comment:12 by Thijs Triemstra, 13 years ago

Cc: Thijs Triemstra added; lists@… removed

comment:13 by Christian Boos, 12 years ago

Owner: anonymous removed
Status: assignednew

Unassigning, as this is not actively worked on.

in reply to:  9 ; comment:14 by Ryan J Ollos, 10 years ago

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?

in reply to:  14 ; comment:15 by Christian Boos, 10 years ago

Milestone: next-minor-0.12.x0.12
Resolution: fixed
Status: newclosed

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.

in reply to:  15 comment:16 by Christian Boos, 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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.