Posted by matt2000 on October 29, 2009 at 12:30am
10 followers
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | node.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | API change, API clean-up, Entity system, Novice |
Issue Summary
Everyone keeps saying, "I always wondered about that, but figured some smart person decided it for a reason..."
Comments
#1
This was born from: http://drupal.org/node/617532#comment-2203464
#2
Ultimately, I'd like to see this fixed as part of #617532: field_ui menu paths doesn't translate underscores in content type names, since this is a fake limitation (and therefore a bug) that never made any sense.
#3
Wouldn't it break links on existing Views using a 'node:type' argument after a D6 -> D7 upgrade ?
#4
webchick overruled the timeline, but provided some background info:
#5
However, this totally awkward conversion of internal ids can cause a range of unexpected bugs. Identifiers should be unique and not munged in any way.
So let's fix this.
#6
Marked #605236: Content type - bundle realname not using machine readable name as duplicate.
I'm not sure I see which clashes you expect. node type names only allow 'a-z_', so converting '_'s to '-'s should not cause any conflict.
#7
#8
Only feature requests and tasks can be assigned to D8 for now, because the Drupal 8 tree is not opened yet.
Fortunately, this is a feature request :)
#9
Subscribing, why did we introduce this conversion in the first place? Is a '-' in a URL prettier than a '_'?
#10
Any takers? This should be relatively simple (just grep entire core for the string replacement and remove them all), so tagging as Novice.
#11
Kick-starting this, 'cos I can't stand this bogus beautification anymore.
#12
The last submitted patch, drupal8.node-type-url.11.patch, failed testing.
#13
Created follow-up issue for #1564832: Remove _node_extract_type() and node_type_get_name() (postponed on this one)
#14
The last submitted patch, drupal8.node-type-url.13.patch, failed testing.
#15
Fixed the exceptions.
#16
The last submitted patch, drupal8.node-type-url.15.patch, failed testing.
#17
Here's a new patch with fixes for the broken tests. (That is, the new code has not changed; instead this patch only includes updates to old tests that try to get a 'test-bundle' url instead of the new 'test-bundle'.)
#18
The last submitted patch, drupal8.node-type-url.17.patch, failed testing.
#19
I guess my patch generation method needs updating... Let's try this one.
#20
woot! Thanks a lot @matt2000!
@chx requested in IRC to dig out why this conversion exists in the first place. Answer: Purely cosmetic.
Introduced in the initial commit for custom node types for D5: #62340-91: Pave the way for CCK
And even back then, a lot of discussion followed on that "beautification" detail already (search the issue for "dash"). :(
#21
OK then.
#22
Oooh I'd not seen this issue. Committed/pushed to 8.x, will need a change notification.
19 files changed, 97 insertions(+), 131 deletions(-)#23
Opened two change notices:
http://drupal.org/node/1574668
http://drupal.org/node/1574670
#24
Thanks! I've revised both a bit.
#25
Automatically closed -- issue fixed for 2 weeks with no activity.