Move URL alias functionality into a Path API module (still separate from the Path UI)

Created on 16 May 2009, about 15 years ago
Updated 26 June 2023, 12 months ago

[tha_sun] If URL aliases can be optional, then there is no point in supporting them in the first place. Add hook_foo(), move that stuff into Path module.
[tha_sun] + if you want to, convert Path into Path + Path UI module.
[tha_sun] Or, better yet, Alias + Alias UI module.
[tha_sun] Am I mistaken, or will http://drupal.org/node/370454 eliminate that path alias bootstrap issue?
[Druplicon] http://drupal.org/node/370454 => Simplify page caching => Drupal, base system, normal, needs work, 19 IRC mentions

[catch] tha_sun: you mean for cached pages? I think so yeah.
[tha_sun] The question is: What prevents Path module from implementing hook_boot() ?
[catch] tha_sun: for drupal_init_path()?
[tha_sun] catch: not sure, basically yes...
[catch] tha_sun: probably not a lot.
[catch] tha_sun: also, we should de-op drupal_lookup_path()
[tha_sun] de-op?
[catch] drupal_lookup_path_alias() drupal_lookup_path_source()
[catch] drupal_static_reset()
[tha_sun] ah, de-$op
[catch] tha_sun: in that case, do we need path.inc at all?
[tha_sun] so, we should fix the cause.
[tha_sun] Interesting question
[tha_sun] :)
[catch] arg() is in there.
[catch] But could move to common.inc I think.
[tha_sun] huh?!
[tha_sun] catch: hook_boot() would run much earlier than DRUPAL_BOOTSTRAP_PATH is running now
[catch] tha_sun: arg() could move to common.inc
[tha_sun] sure thing
[catch] why is drupal_get_title in here?
[tha_sun] LOL
[tha_sun] Let's move check_markup() in there!
[catch] tha_sun: the only one that'd cause serious problems is drupal_is_front_page() if that gets used a lot.
[tha_sun] catch: That has nothing to do with URL aliases?
[catch] drupal_is_front_page?
[Druplicon] drupal_is_front_page: Check if the current page is the front page. => drupal_is_front_page() => http://api.drupal.org/api/function/drupal_is_front_page/6
[catch] tha_sun: apparently it does.
* catch never knew.
[catch] tha_sun: but looks like we should just store normal path for site front page same as the menu system does for links.
[tha_sun] catch: I'm looking at that monolothic path.inc right now. It just converts site_frontpage into a Drupal path. Guess what?
[tha_sun] heh
[tha_sun] system_site_settings_submit?
[tha_sun] bah
[tha_sun] system_site_information_settings_validate?
[Druplicon] system_site_information_settings_validate: Validate the submitted site-information form. => system_site_information_settings_validate($form, &$form_state) => http://api.drupal.org/api/function/system_site_information_settings_vali...
[tha_sun] We already validate.
[tha_sun] We just don't alter.
[catch] nice.
[tha_sun] Most probably -- a UX issue :P
[tha_sun] WTF? I'VE TOLD YOU! MY FRONTPAGE IS eat-my-dog-food NOT node/128412841234
[catch] tha_sun: if we do it for menu items, then they can go and die for the front page.
[catch] tha_sun: or we can remove all of path.inc down to that one function.
[tha_sun] But, who says that we can't invoke drupal_get_path_alias() for that #default_value ..? ;)
[catch] tha_sun: if module_exists('path') drupal_get_path_alias()
[tha_sun] (if Path module is enabled)
[catch] ugh, but yeah.
[catch] tha_sun: path.module could form alter!
[tha_sun] heheh :)
[tha_sun] yay!
[Druplicon] yeeeeeeeeeeeeeeeeeha!
[catch] tha_sun: mind if I paste this into a new issue.
[tha_sun] catch: JohnAlbin-style? "DIE path.inc DIE!!!" :-D
[catch] tha_sun: I'd already typed "path.inc your time has come"

πŸ“Œ Task
Status

Closed: duplicate

Version

9.5

Component
PathΒ  β†’

Last updated 6 days ago

  • Maintained by
  • πŸ‡¬πŸ‡§United Kingdom @catch
Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024