Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7772 closed defect (fixed)

Wiki edit submit links to versioned url instead of Latest Version

Reported by: slestak989@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.2
Component: wiki system Version: 0.11.1
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Discussed this with coderanger in #trac. We determined that the Latest Version should be the url post-submit and that is how 0.10 operated.

I am using trac 11.1 from tarball on rhel 5.2 with pg db, apache + mod_python.

Attachments (1)

7772-fix-and-test.patch (1.2 KB ) - added by Christian Boos 16 years ago.
fix + test, on r7649, 0.11-stable

Download all attachments as: .zip

Change History (11)

comment:1 by Remy Blank, 16 years ago

I find this annoying as well, so +1 from my side.

comment:2 by Christian Boos, 16 years ago

Milestone: 0.11.2
Owner: set to Christian Boos
Severity: normalminor

Agreed, looks like a regression introduced in r7034.

by Christian Boos, 16 years ago

Attachment: 7772-fix-and-test.patch added

fix + test, on r7649, 0.11-stable

comment:3 by Christian Boos, 16 years ago

Status: newassigned

Hm, I can't run Twill at the moment, but can someone test this? (also that the test fails without the fix).

in reply to:  3 ; comment:4 by anonymous, 16 years ago

Replying to cboos:

Hm, I can't run Twill at the moment, but can someone test this? (also that the test fails without the fix).

sure. i will load it up.

in reply to:  4 comment:5 by slestak989@…, 16 years ago

Replying to anonymous:

Replying to cboos:

Hm, I can't run Twill at the moment, but can someone test this? (also that the test fails without the fix).

sure. i will load it up.

cboos,

can we meet over at #trac to discuss the patch? I'll be around there all day.

Thanks

comment:6 by anonymous, 16 years ago

Looks good to me. Tried it on my dev box. 0.11.1 + python2.5 + tracd.

tested the following scenarios:

  • made a wiki edit to unpatched code. url shows version
  • patched the code, made a wiki edit. url doesn't show version.
  • opened up a wiki page and pressed submit without making any changes to ensure r7304 was still effective. It properly warned that no changes were made.
  • reverted the patch and made wiki edt. url shows version.

in reply to:  3 comment:7 by Remy Blank, 16 years ago

Replying to cboos:

Hm, I can't run Twill at the moment, but can someone test this? (also that the test fails without the fix).

  • Patch works well.
  • All tests pass with the complete patch.
  • However, all tests also pass without the change to tester.py.

comment:8 by Christian Boos, 16 years ago

Yeah, that's why I fixed tester.py. The question is, would the test tc.url(page_url +'$') fail without the fix, as expected?

in reply to:  8 comment:9 by Remy Blank, 16 years ago

Replying to cboos:

The question is, would the test tc.url(page_url +'$') fail without the fix, as expected?

Ah, sorry, I may have got that backwards. Let me clarify:

  • If I only patch web_ui.py, all tests pass.
  • If I only patch tester.py, I get 3 failures:
======================================================================
FAIL: Create a wiki page and attach a file
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joe/src/trac/0.11-stable/trac/wiki/tests/functional.py", line 10, in runTest
    self._tester.create_wiki_page(pagename)
  File "/home/joe/src/trac/0.11-stable/trac/tests/functional/tester.py", line 206, in create_wiki_page
    tc.url(page_url+'$')
  File "/usr/lib/python2.5/site-packages/twill/commands.py", line 169, in url
    raise TwillAssertionError("url does not match '%s'" % (should_be,))
TwillAssertionError: url does not match 'http://localhost:8639/wiki/PanditaSpirographin$'

======================================================================
FAIL: Test for regression of http://trac.edgewall.org/ticket/4812
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joe/src/trac/0.11-stable/trac/wiki/tests/functional.py", line 18, in runTest
    self._tester.create_wiki_page(pagename)
  File "/home/joe/src/trac/0.11-stable/trac/tests/functional/tester.py", line 206, in create_wiki_page
    tc.url(page_url+'$')
  File "/usr/lib/python2.5/site-packages/twill/commands.py", line 169, in url
    raise TwillAssertionError("url does not match '%s'" % (should_be,))
TwillAssertionError: url does not match 'http://localhost:8639/wiki/AdoptianismDiapasonal/EmbargoistThalasso$'

======================================================================
FAIL: Test for regression of the timeline fix in r5883
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/joe/src/trac/0.11-stable/trac/timeline/tests/functional.py", line 17, in runTest
    self._tester.create_wiki_page(pagename)
  File "/home/joe/src/trac/0.11-stable/trac/tests/functional/tester.py", line 206, in create_wiki_page
    tc.url(page_url+'$')
  File "/usr/lib/python2.5/site-packages/twill/commands.py", line 169, in url
    raise TwillAssertionError("url does not match '%s'" % (should_be,))
TwillAssertionError: url does not match 'http://localhost:8639/wiki/CzardasAftergrind$'

----------------------------------------------------------------------
Ran 810 tests in 265.432s

FAILED (failures=3)

So it looks like the patch is correct.

comment:10 by Christian Boos, 16 years ago

Resolution: fixed
Status: assignedclosed

Thanks!

Note that we should really fix the functional tests so that they can run without the Subversion bindings.

Meanwhile, I committed the patch in [7650].

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.