Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
path.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
15 Jan 2010 at 22:43 UTC
Updated:
4 May 2025 at 11:13 UTC
Jump to comment: Most recent
If we added entity information to {url_alias} like entity_type (node/term/user) and id (node ID, user ID) we could be able to look up what entities do not have aliases and allow contrib to be able to perform bulk aliasing on un-aliased content.
Comments
Comment #1
dave reidSo a better reasoning for this is instead of having to do the following SQL to find un-aliased nodes:
SELECT n.nid FROM {node} n LEFT JOIN {url_alias} alias ON CONCAT('node/', CAST(n.nid AS CHAR)) = alias.src WHERE alias.src IS NULLWe can do this!
SELECT n.nid FROM {node} n LEFT JOIN {url_alias} ua ON ua.entity = 'node' AND ua.id = n.nid WHERE ua.aid IS NULLOoh, and with this we could add a filter by type on the URL alias screen as well.
Comment #2
brianV commentedA few thoughts:
1. Not every row can have an entity id and type, as aliases can be assigned to any valid Drupal path.
2. Would need code to determine entity type from URL in the case of paths generated via the path add form at admin/config/search/path/add. Code-based calls to path_save() can just require developers to populate the extra keys.
3. We would want to think well about how to display this on the url alias screen so the empty entity type rows would make sense.
Other than that, this is a useful function.
Comment #3
andypostRelated issue #1783964: Allow entity types to provide menu items
Comment #16
smustgrave commentedWith 11 years of inactivity is this still a valid task?
Comment #18
quietone commentedNo one has commented that this needs to be pursued.