This has been bugging me for a while since I prefer URL hacking over menu navigation when adding nodes: When visiting node/add/<type> using incorrect capitalization in the <type>, you'll get a WSOD caused by an undefined variable $output in node_add($type).
The following paths work as expected:
- node/add/page
- NoDe/AdD/page
- node/add/does-not-exist (correctly displays the list of available content types for which nodes can be added)
The following path causes a WSOD:
- node/add/PaGe (would expect to see either the node add page for "page" content type, or the list of available content types)
Given the fact that the rest of the path is treated as case insensitive, node/add/PAGE should show the "Create Page" node form.
Comments
Comment #1
grendzy commentedworks for me.
Comment #2
dries commentedCommitted to CVS HEAD. Thanks.
Comment #3
mr.baileysThanks guys - D6 patch attached.
Comment #5
grendzy commentedsilly bot, this is a D6 patch.
Comment #6
mafi-a commentedHas this been fixed in the latest D6 release? I still encounter this problem
Comment #7
mr.baileys#3: 911980-wsod-add-node.patch queued for re-testing.
Comment #9
mr.baileysRe-rolled against 6.x.
Comment #10
joachim commentedI think this could do with an inline comment, just to prevent a future developer thinking 'WTF?' and changing it back to the expected numerical value.
Comment #11
sivaji_ganesh_jojodae commentedPatch in comment #9 works as advertised.
Comment #12
gábor hojtsyAgreed with @joachim, please add a comment above the changed code explaining why are you doing this.
Comment #13
tadityar commentedAdded the inline comment :)