Errata

Errata are an essential part of textbook publishing, and reader's contributions are especially welcome. To contribute, please register and add a new erratum page. An erratum has two components: 1) a description of the printed error, and 2) a recommended correction. Errata can include typos, mistakes, and unclear text. More general suggestions and comments should be posted as comments on the relevant chapter.

Pagesort descending Erratum Severity Date posted Chapter
15 Chapter 1: page 15 : Disabling Unneeded Modules

The book instructs you to disable the Color and Overlay modules. At press time, disabling the Color module left the Slate color in tact. However, Drupal has changed and this is no longer the case. Now it reverts to the default blue color.

Not too bad November 4, 2011 1. First Steps: Building a Drupal 7 site
159 Wrong field selected in View setup

Item #7 under the 'Building the Authors Headshot View' section contains an error - it says to choose 'Content: Image' as one of the fields, when actually it should be 'Content: Headshot'.

Not too bad December 1, 2011 8. Extending Your Site
163 Unclear item in ordered list / View configuration

Item #1 in the ordered list begins: "Go back to the profile view image display..." I don't understand what this is trying to say.

Minor miscommunication December 2, 2011 8. Extending Your Site
163 Erroneous View Page Display Elements

Contrary to the instructions on this page, there is no option to format the View as "Row style: Node (teaser)". No "Node" options whatsoever are available.

Similarly, there is no option to filter by "Node: Type = Profile" or "Node: Published = Yes".

There is also no available option to sort by "Fields: field_pagecount."

Not too bad December 2, 2011 8. Extending Your Site
174 Missing steps

Figure 8-21 shows setting the display options on the Chapter content type and shows several fields the chapter never told you to create. Figure 8-18 does the same. I know the book isn't supposed to detail every single step but I ran into problems when I tried to figure out how to follow here and would have appreciated some instruction. For example one of the fields not described is Internal name and this field is referenced on this page where you are told to enter a value into it when you create your first Chapter.

Not too bad February 3, 2012 8. Extending Your Site
19-39 $invocation->modules needs unserialize for empty() to work

You mention that you caught missing unserialize() in a different place. $invocation->modules is "a:0{}"; so empty() doesn't produce the right result unless you wrap it in unserialize here as well.

Not too bad December 21, 2013 19. Using Drupal's API in a Module
258 Reverting features in update hooks requires a helper function

The tip on page 258 (Chapter 13, Putting a site online and deploying new features) does not work. The Features revert command needs some helper code wrapping around it, called straight it will fail.

Endangers life August 28, 2011 13. Putting Your Site Online, Staging and Deployment
27 Unable to override theme_more_link - Drupal 7

I followed the instructions provided in the book, but when I clear my cache nothing changes. I have attempted to code the code from another template and still have the same issue. I have attempted to Google a solution but I have as of yet to find a solution.

<?php
/**
* Overrides theme_more_link().
* - Changed the text from "More" to "Show me More"
* - Changed the class from "more-link" to "more"
*/
function dgd7_more_link($variables) {
return '<div class="more">' . l(t('Show me MORE!'), $variables['url'], array('attributes' => array('title' => $variables['title']))) . '</div>';
}
Major problem July 31, 2013 15. Theming
286 Location of html.tpl.php not specified

Location of html.tpl.php is in:

/modules/system directory.

Not too bad February 28, 2012 15. Theming
288, 291 Incorrect index in array of region names

The code listings defining the array of regions (Pgs. 288, 291) have an incorrect index which causes Drupal to spit out the message
Notice: Undefined index: highlighted in include() (line 121 of /var/www/html/drupal/sites/all/themes/dgd7/page.tpl.php).

Not too bad December 27, 2012 15. Theming
29 The word question is repeated

At the bottom of the page, in the Note it says "See additional material and ask question questions about..."

Minor miscommunication June 8, 2012 1. First Steps: Building a Drupal 7 site
317 Theme and Module Implementations, Listing 16-6

The code comment accompanying the example template_preprocess_hook function is incorrect in specifying implementing template_process_hook.

Minor miscommunication May 30, 2012 16. Advanced Theming
335 Implementing theme_contact_site_form()

listing 16-29: The code doesn't seem to be working at all. I'm working on Linux (Ubuntu); there is the code here:
<?php
/**
* Implements theme_contact_site_form().
*/
function dgd7_contact_site_form($variables) {
// Hide the subject field. It's not required.
hide($variables['form']['subject']);
// Change the labels of the "name" and "mail" textfields.
$variables['form']['name']['#title'] = t('Name');
$variables['form']['mail']['#title'] = t('E-mail');
// Create output any way you want.
$output = '';
$output .= ''. t("We'd love hear from you. Expect to hear back from us in 1-2 business days.") .'';
$output .= render($variables['form']['name']);
$output .= render($variables['form']['mail']);
$output .= '';
// Be sure to include a rendered version of the remaining form items.
$output .= drupal_render_children($variables['form']);
// Return the output.
return $output;
}

Major problem September 23, 2012 16. Advanced Theming
337 hook_theme() Implementation for Using Templates with Forms

The code in listing 16-30 doesn't seem to be working at all. I'm working on Linux(Ubuntu). There is the code here:
<?php
/**
* Implements hook_theme().
*/
function mytheme_theme() {
return array(
'contact_site_form' => array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'mytheme') . '/templates',
'template' => 'contact-site-form',
),
);
}

Major problem September 23, 2012 16. Advanced Theming
370 Wrong jQueryUI for the draggable example

Wrong jQueryUI for the draggable example.

Minor miscommunication December 17, 2011 17. jQuery
370 Author meant class instead of id

On line 3:

//add the jQuery UI dialog to all elements with id of dialog

...author meant class, not id - sorry Jake! :)

Minor miscommunication August 20, 2012 17. jQuery
371 Wrong jQueryUI for the droppable example

Wrong jQueryUI for the droppable example

Minor miscommunication December 17, 2011 17. jQuery
388 Typo in git example

In my printing of the book the example for git init reads...

it init
Minor miscommunication December 9, 2011 18. Introduction to Module Development
414 broken link

(near bottom of page)
"With a debugger (see dgd7.org/ide), you can try to watch all the functions..."
(The requested page "dgd7.org/ide" could not be found.)

Not too bad April 5, 2013 19. Using Drupal's API in a Module
419 Example code doesn't work

theme('xray_help', array('text' => $output));
Does not return anything, and therefore causes function _xray_help_admin_appearance() to return nothing as well, generating no help text. (at least in drupal 7.9).

Major problem December 9, 2011 18. Introduction to Module Development
430 Grep Issue

grep -nHR --include=*.module 'View site reports' modules

I am using the MINGW32 Git Bash command line tool in Windows Vista. The above command produces the following errors:

grep: invalid option -- R
grep: unrecognized option '--include=*.module'

Not too bad April 6, 2012 19. Using Drupal's API in a Module
452 Minor Typo

Under "Figuring Out Your Data Model" -- paragraph three, sentence one:

The code that gather shook information, ...

Minor miscommunication July 13, 2012 19. Using Drupal's API in a Module
51 small grammar error

The second paragraph under the "Enable" section states:
"Drupal will not allow you to enable a module if all dependencies are not present in your site files.",
which means if none of the dependencies are present. While this is true, the text should read:
"Drupal will not allow you to enable a module if not all dependencies are present in your site files."

Minor miscommunication February 23, 2012 3. Building Dynamic Pages Using Views
540 Download Drupal, then change directory, not other way around

In the instructions for rapidly downloading a test installation, the cd (change directory) command must follow the downloading of Drupal into the directory of that name.

Not too bad December 29, 2011 24. Writing a Major Module
59 typo

"... and massaging you Views using this ..." should read
"... and massaging your Views using this ...".

Minor miscommunication February 23, 2012 3. Building Dynamic Pages Using Views
60 typo

First bullet point should say "Name: The name of the display of ..."
It currently says, "Name: The same of the display of ..."

Minor miscommunication February 23, 2012 3. Building Dynamic Pages Using Views
71 "User: Name" not a valid filter criteria

The instructions for creating a filter to limit the content to articles written by Bob is written as follows: "Select User from the Filter select box and select the User: Name filter from the list."

In my 7.10 installation of Drupal I don't see "User" as a choice in the Filter select box. I ended up using "Author uid" as the filter criteria. Perhaps I don't have the necessary module installed or enabled or perhaps Drupal changed this along the way.

Not too bad January 3, 2012 3. Building Dynamic Pages Using Views
75 "Wrap field in HTML" should be "Customize field and label wrapper HTML"

The paragraph describing how to modify the output of a field, incorrectly specifies "Wrap field in HTML". As of Drupal 7.9, the checkbox is labeled "Customize field and label wrapper HTML".
Additionally, the diagram below those directions does not show the "Customize field HTML" or "Customize label HTML" checkboxes.

Not too bad February 23, 2012 3. Building Dynamic Pages Using Views
76 Instruction's "Add and Configure" button does not exist.

The directions for handling zero results specify to click "Add and Configure". The only buttons are "Apply" and "Cancel".

Not too bad February 24, 2012 3. Building Dynamic Pages Using Views
77 Tip references actions not specified in the directions

The tip says, "When you went to add the page title", though there is no mention of setting a page title.

Not too bad February 24, 2012 3. Building Dynamic Pages Using Views
78 unquoted words are confusing

"Click Before under Attachment position"... It sounds like I need to click something before doing something else.

Not too bad February 24, 2012 3. Building Dynamic Pages Using Views
78 Using tabs for Unique Displays

The method described does not work. It produces a page with tabs, all of which point to the same URL (eg /?q=content), resulting in the same content displayed no matter what tab you choose. The expected result would be for the tabs to lead to a different URL (eg /?q=content/blog) and display different content (eg the blog posts).

Not too bad July 26, 2013 3. Building Dynamic Pages Using Views
79 Reference to 'Event' content type

Page 79 refers to an "Event" content type, but there is no such content type.

Not too bad December 8, 2011 3. Building Dynamic Pages Using Views
892 Recommended place to put Drush aliases file is kept a secret

In the section "Drush Aliases for All Sites Involved in the Upgrade", a location at which the shown aliases file can be placed so that Drush will read it was not mentioned.

Not too bad December 21, 2011 A. Upgrading a Drupal site from 6 to 7
906 Commit message for Diff module could be more clear

The git commit message
git commit -m "Diff module for helping show differences between features and content."
would be clearer as

Not too bad August 9, 2011 A. Upgrading a Drupal site from 6 to 7
91 "Hexadecimal" misspelled

In the description of the Color module, "hexidecimal" should be "hexadecimal".

Minor miscommunication December 10, 2011 4. There's A Module For That
93 Formatting error

The description of the User module and the introductory paragraph for the next set of core modules are formatted as a single bulleted paragraph, and the list of modules that follow (from Aggregator onward) are indented an extra level, giving the false impression that they're subsidiary to the User module.

Not too bad December 10, 2011 4. There's A Module For That
95 browser'' should be browser's

The description of Pathauto has a double apostrophe after the word browser. The line should be "... in the browser's address bar."

Minor miscommunication December 11, 2011 4. There's A Module For That
96 Incorrect use of possessive "URL's"

In the text about the Token module, the possessive "URL's" is used instead of the plural "URLs".

Minor miscommunication December 11, 2011 4. There's A Module For That
All Chapters in book and on site do not line up

Chapter 19 "Using Drupal's APIs in a module" and Chapter 20 "Refining your module" (probably among others) are not valid "chapters" in this errata submission form.

Major problem December 9, 2011 18. Introduction to Module Development
various Drupal.behaviors attach not working

I can't get the wrapping style that is recommended in the book to fire the jQuery:

Drupal.behaviors.myNameSpace = {
  attach: function(context, settings) { 
    $('.selector').interaction();
  }
};
Not too bad December 17, 2011 17. jQuery