Edgewall Software

Ticket #3965 (closed defect: fixed)

Opened 2 years ago

Last modified 13 months ago

emailed ticket footers don't have url info in them.

Reported by: jon@… Owned by: cboos
Priority: normal Milestone: 0.11
Component: general Version: devel
Severity: minor Keywords:
Cc:

Description

Upgraded to 0.11 (svn-head) and got an email with this as the footer... how can I fix it?

thanks!

jon

-- Ticket URL: </ticket/404> Kink <> Kink

Attachments

Change History

  Changed 2 years ago by cboos

  • keywords documentation added
  • severity changed from normal to minor
  • milestone set to 0.11

Looks like you don't have the [trac] base_url configuration option set.

Before 0.11, if that was missing, the base_url was reconstructed from the current request, which meant in the end that the URL in the notification mail could eventually differ depending on the URL used to trigger the change.

The doc string for that option needs to be updated.

  Changed 2 years ago by anonymous

Yup. It would be nice to have the missing documentation updated. Maybe when changes like this are made, documentation would be updated at the same time. =)

  Changed 19 months ago by cboos

  • milestone changed from 0.11.1 to 0.11

#5530 was closed as duplicate.

See also #5064.

  Changed 17 months ago by ThurnerRupert

TracDev/ReleaseNotes/0.11 contains it, the doc string is what is displayed in wiki:0.11/TracIni?

  Changed 14 months ago by cboos

  • owner changed from jonas to cboos
  • status changed from new to assigned

See also attachment:ticket:5064:use_base_url_for_redirect-r6199.diff, which contains an updated documentation for the [trac] base_url setting, making it clear that its main purpose is to be used as a reference base URL for things like the notification emails.

follow-up: ↓ 7   Changed 14 months ago by cboos

  • keywords documentation removed

... and as osimons suggested, we might revert to the old behavior of setting up automatically the env.abs_href from the req, although that will be a bit hackish.

  • trac/web/main.py

     
    378378 
    379379    req = Request(environ, start_response) 
    380380    resp = [] 
     381 
     382    # fixup env.abs_href if `[trac] base_url` was not specified 
     383    if env and not env.abs_href.base: 
     384        env._abs_href = req.abs_href 
     385 
    381386    try: 
    382387        if not env and env_error: 
    383388            raise HTTPInternalError(env_error) 

in reply to: ↑ 6   Changed 14 months ago by eblot

Replying to cboos:

... and as osimons suggested, we might revert to the old behavior of setting up automatically the env.abs_href from the req, although that will be a bit hackish.

There's probably a warning to trigger in the Trac log if the base_url is not set though: when a ticket notification is emitted from a hook script, for example, there's no request object per se.

  Changed 14 months ago by cboos

Exactly, forgot to mention that. But the warning is printed, though only once.

WARNING: base_url option not set in configuration, generated links may be incorrect

  Changed 13 months ago by cboos

  • status changed from assigned to closed
  • resolution set to fixed

Above patch committed as [6264].

That can be considered as a hack, but a useful one :-)

Add/Change #3965 (emailed ticket footers don't have url info in them.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.