Opened 15 years ago
Last modified 15 years ago
#256 closed defect (FIXED)
Use staticdirect instead of /mgoblin_static/
| Reported by: | Elrond | Owned by: | Elrond |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.2.0 |
| Component: | programming | Keywords: | |
| Cc: | Parent Tickets: |
Description
templates should never use /mgoblin_static/ but use request.staticdirect() instead, which uses the proper paths from the config.
This is relevant when running mediagoblin not on / but on a subpath like /mediagoblin/.
I have fixed the current templates (git branch will be pushed tomorrow).
The interesting question is, if the test suite should test for this? If so, here's an idea on how to do it:
- in test_mgoblin_app.ini set direct_remote_path to something else than /mgoblib_static/
- While testing: add a special "middleware" to the main App, that greps the rendered html for mgoblin_static and errors out.
That way all tested paths will at least also get tested for wrong references. At least, that's my idea on this.
Change History (10)
comment:1 by , 15 years ago
| Owner: | set to |
|---|
comment:2 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Status: | New → Feedback |
Branch with the simple fixes: misc/use_staticdirect Assigning to Chris for branch review/merge.
Later: Should be assigned to nobody for discussing the unit testing (main part!) of this bug.
comment:4 by , 15 years ago
| Milestone: | → 0.1.0 |
|---|---|
| Owner: | set to |
| Status: | Closed → In Progress |
Thanks for merging!
That was only the first part of this bug.
The main bug here is a suggestion:
We should make sure in the unit tests, that this does not happen again. It's not easy to find unless one runs mediagoblin via fastcgi in a subpath. So unit tests seem a better thing than human testing.
comment:5 by , 15 years ago
| Milestone: | → 0.2.0 |
|---|---|
| Owner: | set to |
Okay, I have started on this on my own. I think, I'll push a branch next week or so.
comment:6 by , 15 years ago
| Milestone: | → 0.2.0 |
|---|---|
| Owner: | changed from to |
| Status: | In Progress → Feedback |
Okay, my branch: idea/check_mgoblin_static
Comments? Places that need better docs?
comment:7 by , 15 years ago
Wow, that's really wacky. I guess it works. I'm not completely sure what I think about this... let's talk on IRC :)
comment:8 by , 15 years ago
| Milestone: | → 0.2.0 |
|---|---|
| Owner: | changed from to |
I need to add some docs, move it over to the testing dir... and push it. Will do so during the next month.
comment:10 by , 14 years ago
The original url for this bug was http://bugs.foocorp.net/issues/591 .

Assigning to me, as I need to provide a branch for the base fixes. I will assign back to nobody when done with that part.
Set to 0.1.0, at least for my fixes, because those should get into that release. The possible unit testing might go in later.