Errata (First Edition)
This page lists the errors found in the first edition of the book.
Chapter 3. Module-Specific Settings, Page 27
Tue, 02/10/2009 - 10:37am — jakemonONot sure if this is an error, but I was wondering why the $form['array_filter'] line was removed, without explanation.
[See bottom of page 15. It is only needed for multiple checkbox values. -JV]
Chapter 3. Module-Specific Settings, Page 28
Sun, 04/29/2007 - 5:45am — dshawThe text refers to "turning the field red, as shown in Figure 3-4." My copy of the book is B&W, so this is rather meaningless.
Perhaps a pointer could be included in Figure 3-4, pointing to the field that changes color.
Use of color in a B&W book.
[The entire phrase is this is reflected on the screen in a warning message and by turning the field value red, as shown in Figure 3-4. The reference to the figure is for the warning message, not the color change. -JV]
Chapter 3. Module-Specific Settings, Page 28
Fri, 06/22/2007 - 4:15pm — zensaneTwo instances:
'#default_value' => variable_get('annotate_deletion', 0) // default to Never
and
'#size' => 3
Two instances:
'#default_value' => variable_get('annotate_deletion', 0), // default to Never
and
'#size' => 3,
To adhere to Drupal coding standards, the last array element should be followed by a comma.
Chapter 3. Module-Specific Settings, Page 28
Fri, 04/20/2007 - 8:49pm — Joe Moracaif (!is_numeric($form_values['annotation_limit_per_node'])) {
if (!is_numeric($form_values['annotate_limit_per_node'])) {
The form value annotation_limit_per_node doesn't exist, but annotate_limit_per_node does.
Chapter 3. Module-Specific Settings, Page 29
Wed, 05/30/2007 - 4:03pm — mrsocksThree occurrences:
Drupal has a variables table in the db...
field to the value stored in the variables database table...
retrieved in the variables table
Drupal has a variable table in the db...
field to the value stored in the variable database table...
retrieved in the variable table
The table in question is named 'variable', not 'variables'.
Chapter 3. Module-Specific Settings, Page 31
Sun, 04/29/2007 - 5:47am — dshawRefers to "menu.module" without its full relative path, unlike "menu.inc" which is referred to as "includes/menu.inc" on the previous line (ie. with its full relative path).
Replace "menu.module" with "modules/menu/menu.module".
Small omission.
Chapter 4. The Menu System, Page 34
Fri, 08/17/2007 - 8:06am — jfxberns; $Id $
name = "Mymenu Module"
description = "Adds a menu to the navigation block."
version = "$Name$"
; $Id $
name = Mymenu Module
description = Adds a menu to the navigation block.
version = "$Name$"
Parentheses improperly added to Name and Description lines of mymenu.info file. Code in code repository is correct.
[I think you mean quotation marks, not parentheses. They are optional. Do note that the line version = "$Name$" is no longer necessary and is discouraged. -JV]
Chapter 4. The Menu System, Page 37
Tue, 05/01/2007 - 11:54pm — lyricnz
if (!isset($name)) {
$name = t('good looking!');
}
if (!isset($name)) {
$name = t('good looking');
}
When $name is emitted later in the code, an exclamation is added there, so it's not needed in $name. This is corrected in the second code sample on the page.
Chapter 4. The Menu System, Page 39
Thu, 03/29/2007 - 6:09pm — mathias'access' => user_access('receive greeting') // Returns TRUE or FALSE.
'access' => user_access('receive greeting'), // Returns TRUE or FALSE.
To adhere to Drupal coding standards, the last array element should be followed by a comma.
Chapter 4. The Menu System, Page 41
Sun, 04/29/2007 - 5:50am — dshawThe column headings on the table are difficult to read as slanted text.
Not sure, perhaps rotate the column headings to fully vertical.
Hard to read text.
