Closed (fixed)
Project:
Drupal core
Version:
4.7.0-beta6
Component:
theme system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2006 at 03:45 UTC
Updated:
10 Apr 2006 at 08:15 UTC
My apologies if this is by design, but in the current beta, the missing base href statement in the header is causing problems with using relative links to file names. I've experienced this with Bluemarine and another PHPTemplate theme. For instance, a node with URL http://example.com/node/3 rewrites relative filename of some.tag in an a href statement in the body of that node to http://example.com/node/some.tag. Same problem happens with URL aliased nodes.
Comments
Comment #1
killes@www.drop.org commentedCharlie, did you update your theme? Can you reproduce this with a standard theme?
Comment #2
cel4145 commentedI just started building a brand new site, so I began with the 4.7 beta 6 download. No modifications to the standard Bluemarine theme, and it seems to be happening with all themes. (see following example for Bluemarine).
I've worked around it by adding in the base href statement in the theme template for antique-modern that I'm using. If it would help, contact me and I'll send you the URL and the root admin access to the site so you can take a look.
Comment #3
deekayen commentedA lot of discussion went into making it "by design": http://drupal.org/node/22218#base
Comment #4
cel4145 commentedOkay. So then is Drupal supposed to correctly append user posted URL's in a node body with the correct path anyway?
Comment #5
webchickNo... stuff in a node body is user-contributed content, which Drupal won't touch. A workaround for your situation may be to just add the <base> tag back in at the theme level.
Marking this "by design" since it is now. :\
Comment #6
cel4145 commentedThis will create a major usability issue for people who upgrade sites. For instance, anyone who has been using the upload module and then choosing to not list the attachments because they want to imbed the links in as hyperlinked text in the body or make an image display will have all of those links break.
Better be a warning in the upgrade file.
Marking closed.
Comment #7
gerhard killesreiter commentedActually there is a database update which attempts to fix these paths. function system_update_178()
If this doesn't fix everything, please tell us.
Comment #8
cel4145 commentedWhat does a user do in 4.7 when one wants to link to a file that has been uploaded? Use absolute URL's? That's a problem.
Personally, I don't understand the advantage of not having the base statement, but can see all kinds of problems with not doing so.
Comment #9
killes@www.drop.org commentedI think you need to prefix your file paths with /, ie /files/my_file.tex
WRT the base_href issue: I fully agree with you.
Comment #10
cel4145 commentedthanks. that works.
i hope the payoff is worth it for this change. i can't even imagine how many support problems this will cause.
Comment #11
killes@www.drop.org commentedProbably a lot. I will leave these for the people who wanted this change...
Comment #12
cel4145 commentedI'm opening this back up since now it seems to be causing a problem for drupal.org since the upgrade. For example, try the links in the instructions at the top of the create book page and forum topic. Check the drupal.org admin logs page there are a lot more.
This should have been fixed by the upgrade script, right? The upgrade script will need to parse and look for all relative links without a "/" in front in any user/admin entered text that could contain HTML--nodes, user profiles, explanation or submission guidelines for content types, blocks, localization files, menus, etc. Is it doing this already and are certain things just being missed? If so, we should use Drupal's admin logs to tighten this up.
Comment #13
Steven commentedDrupal.org contains some hacks where we use HTML when we shouldn't. The upgrade script only does nodes and comments. I manually fixed those links. It is IMO not the end of the world.
Comment #14
(not verified) commented