Go To Homepage



Book Details
Pro Drupal Development, Second Edition book cover
  • By John K. VanDyk
  • ISBN13: 978-1-4302-0989-8
  • ISBN10: 1-4302-0989-5
  • 704 pp.
  • Published Aug 2008
  • Print Book Price: $49.99
  • eBook Price: $34.99



Errata Submission

If you think that you've found an error in Pro Drupal Development, Second Edition, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

Submit Errata
Pro Drupal Development, Second Edition (978-1-4302-0989-8)

Errata

Issue Author's Response
Chapter 2, page 23
In the annotate.install code, about 3/4 down the page, there is a call to variable_delete('annotate_node_types'). This threw an "unknown method" error in my attempts to run this code. Changing the call to variable_del('annotate_node_types') seemed to work.
See

http://www.drupalbook.com/errata2
in Chapter 2, page 19 last line of code "variable_get('annotate_nodetypes', array('page'));"
^
under score missing

there is a typo because you've used annotate_node_types in previous example so simple copying pasting will not work :)
Yes; see http://www.drupalbook.com/errata2
Chapter 4
Pages 70/71
Problem type: inconsistency

On page 71 you say "Child menu items do not inherit...access arguments from their parents.The access arguments must be defined for every menu item." But on page 70 you have an example of a child menu item without access arguments.
The change to Drupal where access arguments no longer inherit was done late in the book writing process; I must have missed this code change. The submitter is correct. The code on page 71 should read

'page callback' => 'menufun_goodbye',
'access arguments' => array('receive greeting'),
);

return $items;
}
Chapter 3
Page 48 array_merge code from the end of page:

Description

Sice the keys are numeric the values are appended meaning that if there was already an "insert" in the array we would end up with an appended one:

array("insert","insert")

Excerpt from php manual for array merge:

array_merge — Merge one or more arrays

If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. If, however, the arrays contain numeric keys, the later value will not overwrite the original value, but will be appended.
The last line of code on page 48 should be changed to:

array_unique(array_merge($info['user_block_user_action']['hooks']['comment'], array('insert')));