Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
field_ui.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
28 Oct 2009 at 23:23 UTC
Updated:
12 Nov 2009 at 07:30 UTC
field_ui_menu_load() needs the same hack as node_type_load() in order to translate dashes in URL to underscores in content type machine name.
Attached patch fixes this oversight.
| Comment | File | Size | Author |
|---|---|---|---|
| field_ui_menu_load.patch | 709 bytes | matt2000 |
Comments
Comment #1
matt2000 commentedTo clarify, this is critical because several required field ui pages return 'page not found' for paths containing content type names with underscores.
Another way to deal with this would be to get rid of the convention that disallows underscores in paths, and references content types in paths by their actual machine name, but maybe that exists for reasons beyond my understanding.
Comment #2
sunNice catch.
I have no clue why those path argument conversions exist. They prevent you - without any valid technical reason - from having a content type that uses a hyphen (while only module defined content types can't use a hyphen).
Clearly, pretty paths are the domain of URL aliases, and this conversion adds nothing than countless of totally awkward code lines to core and contrib. So +1 for removing it altogether.
However. Removing that conversion will require plenty of tests to be changed accordingly, so I'd recommend to wait for a sign-off from core maintainers before starting to work on that direction.
Comment #3
sunBumping to get some core maintainer awareness.
Comment #4
yched commentedAgreed on the RTBC, this is an overlook.
I'll also add that, as a CCK maintainer, I've been wondering about that '_' / '-' convention in URLs for more than two years (er, under the assumption that 'ah, some wise people probably know the reason...') ;-)
Comment #5
matt2000 commentedThe Emperor has no clothes!
Here's an issue for Drupal 8: #617562: Remove underscore-to-dash conversion in path arguments for content types
Comment #6
webchickHeh, this underscore-to-hyphen thing was asked for by Dries back when the node type part of CCK first got into core in D5. I don't fancy breaking everyone's URLs at this point, so agree with moving this discussion to D8.
In the meantime, committed this fix to HEAD.