Opened 19 years ago
Closed 18 years ago
#3965 closed defect (fixed)
emailed ticket footers don't have url info in them.
| Reported by: | 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 , 19 years ago
| Keywords: | documentation added |
|---|---|
| Milestone: | → 0.11 |
| Severity: | normal → minor |
comment:2 by , 19 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:4 by , 18 years ago
TracDev/ReleaseNotes/0.11 contains it, the doc string is what is displayed in wiki:0.11/TracIni?
comment:5 by , 18 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → 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 comment:6 by , 18 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
378 378 379 379 req = Request(environ, start_response) 380 380 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 381 386 try: 382 387 if not env and env_error: 383 388 raise HTTPInternalError(env_error)
comment:7 by , 18 years ago
Replying to cboos:
… and as osimons suggested, we might revert to the old behavior of setting up automatically the
env.abs_hreffrom thereq, 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 , 18 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 , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Above patch committed as [6264].
That can be considered as a hack, but a useful one :-)



Looks like you don't have the
[trac] base_urlconfiguration option set.Before 0.11, if that was missing, the
base_urlwas 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.