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

grendzy’s picture

Status: Needs review » Reviewed & tested by the community

works for me.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

mr.baileys’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Needs review
Issue tags: -Needs backport to D6
StatusFileSize
new770 bytes

Thanks guys - D6 patch attached.

Status: Needs review » Needs work

The last submitted patch, 911980-wsod-add-node.patch, failed testing.

grendzy’s picture

Status: Needs work » Needs review

silly bot, this is a D6 patch.

mafi-a’s picture

Has this been fixed in the latest D6 release? I still encounter this problem

mr.baileys’s picture

Issue tags: -Quick fix

#3: 911980-wsod-add-node.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Quick fix

The last submitted patch, 911980-wsod-add-node.patch, failed testing.

mr.baileys’s picture

Status: Needs work » Needs review
StatusFileSize
new913 bytes

Re-rolled against 6.x.

joachim’s picture

I 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.

sivaji_ganesh_jojodae’s picture

Status: Needs review » Reviewed & tested by the community

Patch in comment #9 works as advertised.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs work

Agreed with @joachim, please add a comment above the changed code explaining why are you doing this.

tadityar’s picture

Component: node.module » ajax system
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new637 bytes

Added the inline comment :)

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.