Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12474 closed defect (fixed)

404 Not Found for Review changes

Reported by: massimo.b@… Owned by: Jun Omae
Priority: normal Component: CodeReviewerPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

This is trac 1.0.5 and the latest svn revision of CodeReviewerPlugin. When reviews state of changes is changed (Open->Passed or also Passed->Open) I always get a 404 Not Found. The status of the change review however is changed successfully after that.

Attachments (0)

Change History (8)

comment:1 Changed 9 years ago by massimo.b@…

The debug log doesn't tell much:

2015-08-10 11:29:38,894 Trac[main] DEBUG: Dispatching <RequestWithSession "POST '/changeset/2d5f0e9f0f1ee4c0b88e1a2243bad4e9ef94a320/ttm'">
2015-08-10 11:29:38,896 Trac[session] DEBUG: Retrieving session for ID u'Mb'
2015-08-10 11:29:38,900 Trac[PyGIT] DEBUG: PyGIT.Storage instance 140483974502608 constructed
2015-08-10 11:29:38,900 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage instance 140483974502608 for '/mnt/data/userspace/project/TTM/'
2015-08-10 11:29:38,900 Trac[git_fs] DEBUG: disabled CachedRepository for '/mnt/data/userspace/project/TTM/'
2015-08-10 11:29:38,901 Trac[PyGIT] DEBUG: triggered rebuild of commit tree db for 140483974502608
2015-08-10 11:29:38,924 Trac[PyGIT] DEBUG: rebuilt commit tree db for 140483974502608 with 170 entries (took 23.1 ms)
2015-08-10 11:29:38,938 Trac[PyGIT] DEBUG: git exits with 1, dir: u'/mnt/data/userspace/project/TTM/', args: config ('--get', 'i18n.commitEncoding'), stderr: ''
2015-08-10 11:29:38,941 Trac[chrome] DEBUG: Prepare chrome data for request
2015-08-10 11:29:38,944 Trac[PyGIT] DEBUG: PyGIT.Storage instance 140483976035152 constructed
2015-08-10 11:29:38,944 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage instance 140483976035152 for '/mnt/data/userspace/project/PRM/'
2015-08-10 11:29:38,944 Trac[git_fs] DEBUG: disabled CachedRepository for '/mnt/data/userspace/project/PRM/'
2015-08-10 11:29:38,944 Trac[PyGIT] DEBUG: PyGIT.Storage instance 140483976035408 constructed
2015-08-10 11:29:38,945 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage instance 140483976035408 for '/mnt/data/userspace/project/PRM2/'
2015-08-10 11:29:38,945 Trac[git_fs] DEBUG: disabled CachedRepository for '/mnt/data/userspace/project/PRM2/'
2015-08-10 11:29:38,945 Trac[PyGIT] DEBUG: PyGIT.Storage instance 140483976035792 constructed
2015-08-10 11:29:38,945 Trac[PyGIT] DEBUG: requested weak PyGIT.Storage instance 140483976035792 for '/mnt/data/userspace/project/PRM4/'
2015-08-10 11:29:38,946 Trac[git_fs] DEBUG: disabled CachedRepository for '/mnt/data/userspace/project/PRM4/'

Current configuration:

[codereviewer]                                                                                                                                             
failed = ,owner={author}
passed = ,owner={author}
status_choices = rejected,open,passed

[ticket-custom]
review = select                                                                                                                                            
review.label = Review
review.options = |? : required|+ : passed|- : failed
review.order = 8
review.value =

comment:2 Changed 9 years ago by Ryan J Ollos

Owner: changed from Rob Guttman to Ryan J Ollos
Status: newaccepted

I'll try to take a look soon.

comment:3 Changed 9 years ago by Ryan J Ollos

What is the URL before and after the submit in which the 404 not found results? I suspect the problem is in post_process_request, and that the base path is not being accounted for.

comment:4 Changed 9 years ago by Ryan J Ollos

#12491 closed as a duplicate.

comment:5 Changed 9 years ago by Jun Omae

I consider Href(req.path_info) leads intentional results when multiple projects are used.

  • codereviewerplugin/1.0/coderev/web_ui.py

    diff --git a/codereviewerplugin/1.0/coderev/web_ui.py b/codereviewerplugin/1.0/coderev/web_ui.py
    index ce9a28f..f8794d6 100644
    a b from trac.versioncontrol.api import IRepositoryChangeListener, RepositoryManager 
    2020from trac.versioncontrol.web_ui.changeset import ChangesetModule
    2121from trac.web.chrome import (ITemplateProvider, add_script, add_script_data,
    2222    add_stylesheet, pretty_timedelta, web_context)
    23 from trac.web.href import Href
    2423from trac.web.main import IRequestFilter
    2524from trac.wiki.formatter import format_to_html
    2625from trac.wiki.macros import WikiMacroBase
    class CodeReviewerModule(Component): 
    7877                               req.args['summary']):
    7978                    self._update_tickets(review, status_changed)
    8079                    tickets = review.tickets
    81                 href = Href(req.path_info)
    82                 req.redirect(href(tickets=tickets))
     80                req.redirect(req.href(req.path_info, tickets=tickets))
    8381            ctx = web_context(req)
    8482            format_summary = functools.partial(format_to_html, self.env, ctx,
    8583                                               escape_newlines=True)

comment:6 Changed 9 years ago by tecsupport2@…

When are you planning to fix this?

comment:7 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14888:

1.0.0dev: Redirect didn't account for base URL. Fixes #12474.

Unsupported operands error with repository containing integer revisions. Refs trac:#12179.

Both patches by Jun Omae.

comment:8 Changed 9 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.