Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2010 at 16:14 UTC
Updated:
18 Nov 2010 at 10:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhodgdonIs that actually true? Can you point to where in the code this is set up so a reviewer can verify?
If it is true, it should be mentioned in the hook_form_alter() and hook_form_FORM_ID_alter() docs, rather than or in addtion to drupal_get_form(). And it should be done in D7 first, then backported to D6, unless it is only true in D6.
You file a lot of issues, which is helpful... Can you please also when you file issues, change the title to something more descriptive than "documentation problem with ..."? Thanks.
Comment #2
joachim commentedThe relevant code and comment is in drupal_retrieve_form():
I had no idea this existed until I went hunting for a way to do this today!
> Can you please also when you file issues, change the title to something more descriptive than "documentation problem with ..."? Thanks.
Yup, will do!
Comment #3
joachim commentedThings have changed for D7: the args get put into $form_state['build_info']['args'] in drupal_get_form(). Though there's no mention of it in the docs there either.
Comment #4
jhodgdonSounds like a good thing to document then. Just need a patch...
Comment #5
joachim commentedHere's a patch for D7.
Comment #6
jhodgdonNeed to set to "needs review" status in order to launch the testing bot, and alert humans that you have a patch. :)
Comment #7
jhodgdonLooks like a good patch to me, thanks! I've confirmed what joachim said in #3, that's where the args are put in D7, and it is a good idea to document them.
When committed, please pass to D6 for porting, thanks.
Comment #8
dries commentedCommitted to CVS HEAD. Thanks.
Comment #9
joachim commentedNeeds some changes for D6.
Where does the equivalent of modules/system/system.api.php live on 6?
Comment #10
jhodgdonThe hook docs for D6 are in the contrib repository. You can see the file name on the page on api.drupal.org.
Comment #11
joachim commentedIn the docs repository, you mean?
I assume this one: http://drupalcode.org/viewvc/drupal/contributions/docs/developer/hooks/c...
(Meta: are there any docs on how to get a checkout of this? I've got far too used to the CVS instructions tab on project pages :/)
Here are two patches, one on D6 core for drupal_get_form() and one on the docs for the hooks.
Comment #12
jhodgdonDocs on checking out contrib repository: http://drupal.org/node/321
Regarding these patches, I think the form.inc patch is using the D7 location of $args, not the D6 location?
I've committed the other patch to the contrib repository.
Comment #13
joachim commentedOops.
Comment #14
jhodgdonThat looks better. It applies cleanly, and should be committed to the D6 docs. Thanks.
Comment #16
joachim commentedSounds like the bot is on crack again:
Comment #17
jhodgdonI had at least 5 failures like this in my queue this morning. The details:
Thta's bogus. It should be able to find includes/form.inc. These patches apply fine.
Comment #18
gábor hojtsyCommitted, thanks.