Opened 13 years ago

Last modified 12 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.



Change History (10)

comment:1 by Elrond, 13 years ago

Owner: set to Elvenlord Elrond
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.



comment:2 by Elrond, 13 years ago

Owner: changed from Elvenlord Elrond to Christopher Webber
Status: NewFeedback
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:3 by Christopher Allan Webber, 13 years ago

Status: FeedbackClosed
Merged. Sorry it took so long!



comment:4 by Elrond, 13 years ago

Milestone: 0.1.0
Owner: set to Christopher Webber
Status: ClosedIn 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 Elrond, 13 years ago

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 by Elrond, 13 years ago

Milestone: 0.2.0
Owner: changed from Elvenlord Elrond to Christopher Webber
Status: In ProgressFeedback
Okay, my branch: idea/check\_mgoblin\_static

Comments?
Places that need better docs?



comment:7 by Christopher Allan Webber, 13 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 Elrond, 12 years ago

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:9 by Elrond, 12 years ago

Status: FeedbackClosed
Puhh. Done!



comment:10 by Will Kahn-Greene, 12 years ago

The original url for this bug was http://bugs.foocorp.net/issues/591 .

Note: See TracTickets for help on using tickets.