Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#3965 closed defect (fixed)

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

Reported by: jon@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: general Version: devel
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

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 (0)

Change History (9)

comment:1 by Christian Boos, 15 years ago

Keywords: documentation added
Milestone: 0.11
Severity: normalminor

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.

comment:2 by anonymous, 15 years ago

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. =)

comment:3 by Christian Boos, 14 years ago

Milestone: 0.11.10.11

#5530 was closed as duplicate.

See also #5064.

comment:4 by ThurnerRupert, 14 years ago

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

comment:5 by Christian Boos, 14 years ago

Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

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.

comment:6 by Christian Boos, 14 years ago

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 comment:7 by Emmanuel Blot, 14 years ago

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.

comment:8 by Christian Boos, 14 years ago

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

comment:9 by Christian Boos, 14 years ago

Resolution: fixed
Status: assignedclosed

Above patch committed as [6264].

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

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.