Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
node.module
Priority:
Minor
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
18 May 2010 at 20:27 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
crookednumber commentedComment #2
aspilicious commentedReturn => Returns
Comment #3
crookednumber commentedThanks. Re-roll attached.
Comment #4
aaronbaumanWe can simplify this further:
If the sole purpose of node_add is to return the node form, it shouldn't set the page title either.
This also alleviates the side effect of developers having to reset the page title whenever they call node_add to get the node form.
Is there a historical reason that node_menu's node/add/* doesn't just set the final title?
Here is a re-roll with the suggestion.
Comment #6
aaronbaumanThis patch had the side effect of renaming links on "node/add" from "@type" to "Create @type", since node_add_page uses
system_admin_menu_blockto display its content.revised patch:
drupal_set_titlefromnode_add.node_add_page_title, which returns the translated "Create @name" titletheme_node_add_listto use the menu item's $item['link_title'] (the human readable type name) instead of $item['title'] (the translated menu title "Create @name") in order to address the side effect mentioned at the beginning of this comment.Comment #8
aaronbaumanLooks like the reason for using drupal_set_title in node_add, rather than declaring it in the menu callback, is to make the menus cleaner all around. Please ignore comments #4 - #7 and see patch #3, which works for me.
sorry for the WOB.
Comment #9
crookednumber commentedNo problem. I was wondering about that, too. Now I learned something.
Re-rolling patch from #3 (vs latest HEAD), so folks scanning this list see green at the bottom.
Comment #10
betz commentedPatch tested and works.
node/add/nonexistingtypegives me thenode/addpage, which is a good thing ^^Comment #11
dries commentedCommitted to CVS HEAD. Thanks.