Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: http://api.drupal.org/api/drupal/modules%21node%21node.pages.inc/functio...
Enter a descriptive title (above) relating to node_add_page, then describe the problem you have found:
Seems to be missing a docblock on D7. Has one on D8.
Comment | File | Size | Author |
---|---|---|---|
#25 | core-node_add_page-doc-backport-1664070-21.patch | 473 bytes | marcin.wosinek |
#21 | core-node_add_page doc backport-1664070-11.patch | 473 bytes | marcin.wosinek |
#11 | drupal-1664070-11.patch | 576 bytes | tim.plunkett |
#9 | node-add-page-doc-1664070-9.patch | 478 bytes | mjonesdinero |
#7 | node-add-page-doc-1664070-7.patch | 472 bytes | mjonesdinero |
Comments
Comment #1
joachim CreditAttribution: joachim commentedThough it should be noted that the D8 doc header is wrong: this is not a form.
Comment #2
jhodgdonThe D8 header does not say it is a form. It says it is a page callback that presents a form... but you are right, there isn't a form there at all. OK, let's document this function correctly in D8 and then backport this correct doc to D7. Thanks for the report and clarification!
Comment #3
mjonesdinero CreditAttribution: mjonesdinero commentedassigning to me for further feedback.
attach is a patch for my documentation of the function
@jhodgdon
if feedback is past 6pm Philippines time, will continue to work on this on Monday morning in Philippines time also
Thanks
Comment #4
jhodgdonGood try! But what we need to do is replace the existing line that says "Presents the node add form" with a more accurate description, not add text before-hand. Also, the first line of any function documentation needs to be a one-line sentence of less than 80 characters:
http://drupal.org/node/1354#functions
and specifically for page callbacks:
http://drupal.org/node/1354#menu-callback
Comment #5
mjonesdinero CreditAttribution: mjonesdinero commentedupdate the patch
Comment #6
jhodgdonThanks for the 2nd try! It's a bit better, but this still isn't quite right:
- Verb tense is wrong: http://drupal.org/node/1354#menu-callback
- The text is still inaccurate. The function normally makes a list of links to add different types of content (if your system has multiple content types), and alteratively goes directly to the node/add/[type] page if you only have one content type. This text does not say that at all, and it needs to.
Comment #7
mjonesdinero CreditAttribution: mjonesdinero commentedhope this is okie now..
Comment #8
jhodgdonMuch better! Maybe though the first line should say:
Displays a list of add content links for available content types.
I make this suggestion because (a) it's not displaying just a list of the content types, but a list of links to add content, and (b) in the other line you added, they're correctly referred to as "content types" rather than "node types". I'm not sure if this will fit in 80 characters... hopefully?
Comment #9
mjonesdinero CreditAttribution: mjonesdinero commentedHI jhodgdon.
Displays a list of add content links for available content types.
i change it to
Displays add content links for available content types.
so that it fit for 80lines..
Comment #10
jhodgdonGreat! I love that choice of words. Simple, concise, and gets the point across. :)
I've committed the patch in #9 to Drupal 8.x. Time to backport to 7.x, where the function doesn't even have documentation. Thanks!
Comment #11
tim.plunkettRerolled.
Comment #12
cafuego CreditAttribution: cafuego commentedLooks good to me.
Comment #13
jhodgdonThanks! I'll get it committed shortly.
Comment #14
jhodgdonCommitted to 7.x -- thanks all!
Comment #16
joachim CreditAttribution: joachim commentedShall we backport this to 6.x too?
Comment #17
jhodgdonSounds like a good idea. The function node_add_page() appears to be completely undocumented in D6.
A direct port of the page doesn't seem like the right thing to do, though, since it looks like in D6 the function always displays a list (even if there is only one type of node the person can add).
Comment #19
webchickComment #20
webchickComment #21
marcin.wosinek CreditAttribution: marcin.wosinek commentedBackport to 6.
Comment #22
David_Rothstein CreditAttribution: David_Rothstein commentedComment #23
jhodgdonThanks! The patch looks good for D6. By the way, you need to set the issue status to "needs review" when you upload a patch. :)
Comment #25
marcin.wosinek CreditAttribution: marcin.wosinek commentedFile name fixed.
Comment #26
jhodgdonThat previous error looks like a test bot glitch... Still RTBC.
Comment #27
jhodgdonOh I see, the file name had spaces in it. Ugh.
Comment #28
jhodgdonThanks again -- committed to 6.x.