Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Issue tags:
Reporter:
Created:
9 Dec 2010 at 18:44 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonProbably a good novice project. Just need to figure out what the constants are being used for, and describe it in a sentence.
Comment #2
Anonymous (not verified) commentedIll do this one!
Comment #3
Anonymous (not verified) commentedWrote some stuff up, i hope the array name $field is right. Was unsure about it for a while.
Comment #4
Anonymous (not verified) commentedUsed this as source by the way: http://api.drupal.org/api/drupal/modules--field--field.api.php/function/...
Comment #5
jhodgdonThe information looks correct to me, but the formatting is not correct. Please check out
http://drupal.org/node/1354
The first line of any docblock should be a one-line, one-sentence summary, and then there should be a blank line, followed by other necessary information. Also, all lines should be wrapped as close to 80 characters as possible; if you need a new paragraph, leave a blank line.
Comment #6
Anonymous (not verified) commentedGoing again, might need more input though.
Comment #7
jhodgdonI forgot to mention it before, but we should have a blank line between the end of one function/define/etc. and the next /** line.
This block also needs to start with a single one-line 80-character sentence description:
I also think the description line for this one is misleading, since this constant is used both for default value and multiple values:
I guess generally the first-line summaries should summarize what the constant is used for. They should generally be plain text, and not have things like $field[] in them. So I think the information you have is good, but it needs a bit of rewriting to be prose instead of symbols. Thanks!
Comment #8
Anonymous (not verified) commentedComment #9
Anonymous (not verified) commentedThere is a new one, corrected another field also using the ugly $field[] and breaking plain text.
EDIT: doh, included the patch twice. :)
Comment #10
jhodgdonGetting closer!
- api => API (acronyms should be all-caps).
- doesnt => doesn't
- I think one line of the patch is longer than 80 characters, but I wasn't sure because I couldn't get it to apply to HEAD.
- I thought the longer description for FIELD_BEHAVIOR_DEFAULT was a bit confusing. Maybe reformulate something like this:
If used in a widget default context, indicates the widget accepts default values. If used in .... (etc.)
- Should all of these constants have a @see that points you to the function/hook where they are used, which I guess is hook_field_widget_info()? That might be helpful.
Comment #11
Anonymous (not verified) commentedHere goes again, corrected the errors and added @see as you proposed. Hope it applies to HEAD now too.
Comment #12
jhodgdonThat looks fine to me.
I can't seem to apply the patch still, and I figured out what the problem is.
In my patching environment (I use Eclipse), if there is a blank line of context (i.e. a line that isn't changed in the patch), the patch file has a single space on the line (in the column where the +/- signs go). Yours seems to make the line totally blank. Mine expects that space to be there, and if I add spaces to the totally blank lines, I can get the patch to apply.
The testing bot doesn't seem to care one way or the other (it seems to like both patches you create and patches I create). But that's why I can't apply your patches.
Anyway, all of that is an aside. I think we should get this patch in, and thanks!
Comment #13
jhodgdonFYI:
http://www.gnu.org/software/hello/manual/diff/Detailed-Unified.html#Deta...
It does say "The lines common to both files begin with a space character." nenne: Just out of curiosity, what system are you using to create your patches?
Comment #14
webchickGreat work, nenne!
Committed to HEAD. Thanks!
Comment #15
Anonymous (not verified) commentedJhodgdon: i use "cvs diff -up [file] > [patch]" to create the patches.
Version "1:1.12.13-12ubuntu1" of cvs on Lucid Lynx.
Comment #16
jhodgdonThat's very odd. When I use the same command on my Ubuntu box (same version of CVS, but it's probably the diff command that is making the patches -- but probably the same version of diff as you have), the blank context lines have a single space at the end. Hmmm.