Errata (First Edition)

This page lists the errors found in the first edition of the book.

Chapter 16. Sessions, Page 257

Location on the page: 
First full paragraph on the page, right at the top.
Error: 

The error is identical to this http://www.drupalbook.com/node/154.

Chapter 16. Sessions, Page 257

Location on the page: 
Bottom paragraph
Error: 

(Middle sentence) The exception to this is if the requestor doesn't accept cookies; in this case no row will be written to the sessions table.

Correction: 

Actually if anything has been stashed in $_SESSION then a row will be written to the sessions table. If the requestor doesn't accept cookies (and hence won't have presented one to the site) then while it is true that in general in this case a row won't be written to the table, the reason for this is that it is unusual for page requests for anonymous visitors to store anything in $_SESSION.

Chapter 17. Using jQuery, Page 265

Location on the page: 
last paragraph
Error: 

misc/query.js

Correction: 

misc/jquery.js

Description of the Error: 

wrong file name for jquery

Chapter 17. Using jQuery, Page 265

Location on the page: 
Code sample under jQuery Within Drupal
Error: 

Line 5 contains an extraneous ";" and reads:
});,

Correction: 

Line 5 should read:
}),

Description of the Error: 

Original code results in PHP parse error

[Nope. Look at this carefully. The correct line 5 is })', because the curly bracket closes the function(){} and the right parenthesis closes the ready() method and the sinqle quote closes the string that is the first parameter for drupal_add_js(). -JV]

Chapter 19. XML-RPC, Page 294

Location on the page: 
Third paragraph
Error: 

xmlrpc_errorno()

Correction: 

xmlrpc_errno()

Description of the Error: 

Typo in function name.

Chapter 19. XML-RPC, Page 294

Location on the page: 
In code results
Error: 

remote site gave an error:

Correction: 

remote site said:

Description of the Error: 

The output should reflect the code listing earlier on the same page.

Chapter 19. XML-RPC, Page 295

Location on the page: 
code listing
Error: 

xmlrpc_xmlc_guess_lucky_number

Correction: 

xmlrpc_xmls_guess_lucky_number

Description of the Error: 

function name should follow the function name suggestion on page 296, first paragraph below first note: 'xmls' for server functions, 'xmlc' for client functions

Chapter 19. XML-RPC, Page 295

Location on the page: 
xmlrpclucky.info code listing
Error: 

version = $Name$

Correction: 

version = "$Name$"

Description of the Error: 

Special characters in .info files must be quoted. But note that defining a version in an info file is now strongly discouraged.

Chapter 20. Writing Secure Code, Page 301

Location on the page: 
last paragraph
Error: 

ASCII character 20

Correction: 

ASCII character 32

Description of the Error: 

In url encoding, the "20" in "%20" is a hexadecimal representation, which is "32" in decimal representation. Most readers will read "20" as "twenty", instead of "thirty two". This should be made more clear.

Chapter 20. Writing Secure Code, Page 309

Location on the page: 
last line
Error: 

http://example.com/?'%20R%20type%20=%20'story

Correction: 

http://example.com/?q=insecure/'%20R%20type%20=%20'story

Description of the Error: 

part of url was omitted