Closed (won't fix)
Project:
Drupal core
Version:
x.y.z
Component:
path.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2006 at 03:47 UTC
Updated:
29 May 2006 at 20:02 UTC
Please, see attached patch. It's simple, but also pretty handy.
| Comment | File | Size | Author |
|---|---|---|---|
| path.module_2.patch | 911 bytes | markus_petrux |
Comments
Comment #1
dries commentedShould use get_base() instead of a global.
Comment #2
markus_petrux commentedThere's a function to return $base_path, base_path(). But there isn't to return $base_url.
Do you mean, there should be a function get_base() to return $base_url? If so, this is a too big change for me, I believe.
Comment #3
markus_petrux commentedI was just reviewing issues...
Dries, there is no such a function. Maybe if one has to be implemented, then is it enough creating the function? ...or every instance of $base_url should be changed to get_base() in core modules?
Though, here are several places where $base_url is used (this is something that comes from 4.6 so there may be modules...). This issue was just about a simple idea to add something useful to admin/path... ie. turn paths into links... does that worth?
Should the implementation of get_base() be dealt from this issue?
Comment #4
Steven commentedPrefixing with the base_url to force out the unaliased path is unsupported and buggy. It will not work for unclean URLs for example.
Why do we need to link to the unaliased path anyway? The resulting page is by definition identical to the one you get from the aliased path.
Comment #5
markus_petrux commentedProviding a link for unaliased path would allow you to easily check if it really points to a valid path.
Please confirm so I can reroll the thing properly. Thanks
Comment #6
Jaza commentedI don't think this feature is necessary. 99% of users will have no desire to check whether or not the unaliased path resolves: they will simply trust that Drupal is stable and that it works, or they might not care if it resolves at all. The other 1% of users can check this by manually typing in the URL of the unaliased path.
Also, for the 99% of users in the first category, this feature will only serve to confuse.
Comment #7
markus_petrux commentedI just found the need to check URLs due to bugs in pathauto module. Hence the idea.
I no one else see this feature useful, I'll mark the issue as won't fix the next time I revisit it... don't hesitate to do it right now, if you wish.
Comment #8
markus_petrux commentedComment #9
markus_petrux commentedI ended up implementing this feature as a contrib module. It's available here, if anyone wishes to take a look:
http://www.phpmix.org/projects/drupal
In addition to render paths as links, it attempts to identify broken aliases. The alias checker is something that may need more work, but it has an option that allows you to flag aliases as 'known' by using regular expressions. Yep! This is an experiment, but I needed to check a site with a lot of content and it saved me some time...
If you wish to comment on anything about it, please use my forums (follow the support link in the module page). I'm very busy these days and hardly monitor Drupal for news et al. Thanks