Opened 11 years ago
Last modified 11 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: 1. in ``test_mgoblin_app.ini`` set ``direct_remote_path`` to something else than /mgoblib\_static/ 2. 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.
Subtickets
Change History (10)
comment:1 Changed 11 years ago by
Owner: | set to Elvenlord Elrond |
---|
comment:2 Changed 11 years ago by
Owner: | changed from Elvenlord Elrond to Christopher Webber |
---|---|
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 Changed 11 years ago by
Milestone: | → 0.1.0 |
---|---|
Owner: | set to Christopher Webber |
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 Changed 11 years ago by
Milestone: | → 0.2.0 |
---|---|
Owner: | set to Elvenlord Elrond |
Okay, I have started on this on my own. I think, I'll push a branch next week or so.
comment:6 Changed 11 years ago by
Milestone: | → 0.2.0 |
---|---|
Owner: | changed from Elvenlord Elrond to Christopher Webber |
Status: | In Progress → Feedback |
Okay, my branch: idea/check\_mgoblin\_static Comments? Places that need better docs?
comment:7 Changed 11 years ago by
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 Changed 11 years ago by
Milestone: | → 0.2.0 |
---|---|
Owner: | changed from Christopher Webber to Elvenlord Elrond |
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 Changed 11 years ago by
The original url for this bug was http://bugs.foocorp.net/issues/591 .
Note: See
TracTickets for help on using
tickets.
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.