Modify

Opened 3 years ago

Closed 3 years ago

#12582 closed defect (fixed)

Submit button to the wrong URL address?

Reported by: johnt888@… Owned by: Cauly
Priority: normal Component: AccreditationPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

Hi -

I installed the plugins, but it pointed to the wrong address when I clicked the Submit button. Could you help for the possible issues?

Our Trac is set up based on Apache server and it looks like:

https://www.abc.com/trac/example

But when I clicked the Submit button, it points to:

https://www.abc.com/accreditation/new

It doesn't exist ... Does this plugin apply to the standalone trac server only?

thanks!

Attachments (1)

t12582.diff (880 bytes) - added by Ryan J Ollos 3 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by Ryan J Ollos

I believe the following untested patch will fix the issue:

  • accreditationplugin/trunk/Accreditation/Accreditation.py

     
    8686
    8787            ticket.save_changes(req.authname, "Launched New Accreditation '''%s'''" % topic)
    8888
    89             req.redirect('/ticket/' + str(id))
     89            req.redirect(req.href.ticket(id))
    9090
    9191        elif req.path_info.startswith('/accreditation/comment'):
    9292
     
    107107
    108108            ticket.save_changes(req.authname, "Accredited '''%s''' for \"''%s''\".\n\n%s" % (topic, conclusion, comment))
    109109
    110             req.redirect('/ticket/' + str(id))
     110            req.redirect(req.href.ticket(id))
    111111
    112112    def filter_stream(self, req, method, filename, stream, data):
Last edited 3 years ago by Ryan J Ollos (previous) (diff)

Changed 3 years ago by Ryan J Ollos

Attachment: t12582.diff added

comment:2 in reply to:  description Changed 3 years ago by Ryan J Ollos

Replying to johnt888@…:

It doesn't exist ... Does this plugin apply to the standalone trac server only?

Just for future consideration, I wouldn't worry too much about plugins applying to TracStandalone only. In some cases there may be defects that are only revealed when running with certain configurations, but they are usually easily correctable and all plugins should work with TracStandalone and a "real" webserver.

comment:3 Changed 3 years ago by Cauly

Resolution: fixed
Status: newclosed

In 15068:

bug fix #12582

comment:4 Changed 3 years ago by Cauly

Thanks a lot, rjollos

comment:5 Changed 3 years ago by johnt888@…

Resolution: fixed
Status: closedreopened

Thanks for the patch and it works for first Submit button now. But I put the "Conclusion" & "Comment" and clicked Submit button ... It points to the following URL, but it doesn't exist.

https://www.abc.com/trac/example/accreditation/comment

Could you help check the issue is?

Thanks again!

comment:6 Changed 3 years ago by johnt888@…

Here is the output from Trac:

File "build/bdist.linux-x86_64/egg/Accreditation/Accreditation.py", line 98, in process_request

Code fragment:

Line

93

94

req.redirect(req.href('ticket', id))

95

96

elif req.path_info.startswith('/accreditation/comment'):

97

98

id = int(req.argsticket?)

99

topic = req.argstopic?

100

author = req.authname

101

conclusion = req.argsconclusion?

102

comment = req.argscomment?

103

comment:7 Changed 3 years ago by johnt888@…

Hmm... It works if I create a new ticket. The existing tickets(before installing this plugin) won't work. If it only applies to the new ticket after installation of the plugins, it should be fine.

thanks!

comment:8 in reply to:  6 Changed 3 years ago by Ryan J Ollos

Replying to johnt888@…:

Here is the output from Trac:

File "build/bdist.linux-x86_64/egg/Accreditation/Accreditation.py", line 98, in process_request

Please take moment to review the WikiFormatting page so that you can post content that is readable.

comment:9 Changed 3 years ago by johnt888@…

sorry to generate the messy format in my previous updates ... Not sure the root cause is, but it's working for the old tickets after I close IE/clean caches. thanks and sorry for false alarm.

comment:10 Changed 3 years ago by Ryan J Ollos

Resolution: fixed
Status: reopenedclosed

No problem, thanks for the fast reply.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Cauly.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.