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: | 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)
Change History (11)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Milestone: | → 0.11.2 |
---|---|
Owner: | set to |
Severity: | normal → minor |
Agreed, looks like a regression introduced in r7034.
follow-ups: 4 7 comment:3 by , 16 years ago
Status: | new → assigned |
---|
Hm, I can't run Twill at the moment, but can someone test this? (also that the test fails without the fix).
follow-up: 5 comment:4 by , 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.
comment:5 by , 16 years ago
comment:6 by , 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.
comment:7 by , 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
.
follow-up: 9 comment:8 by , 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?
comment:9 by , 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 , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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].
I find this annoying as well, so +1 from my side.