Errata


Print Print Icon

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.


Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question



Version Location Description Submitted By Corrected
Printed Page 79
Line 4 (first code example)

The pipe symbol in this line, between "Article" and "Article", should be Roman, not italics.

I'm the author and I approve this erratum. :-)

Daniel J. Barrett
O'Reilly Author 
Printed Page 233
Second code sample

This example does let superheroes edit in the Headquarters namespace, but it goes too far and also gives them all the abilities of sysops via the "editinterface" right. To fix this problem, replace the last five lines of code:

// Make namespace read-only except to those with the editinterface
// right, such as sysops
$wgNamespaceProtection[NS_HEADQUARTERS] = array('editinterface');

// Give superheroes the editinterface right
$wgGroupPermissions['superheroes']['editinterface'] = true;

with these six lines:

// Create a right unique to superheroes.
$wgGroupPermissions['superheroes']['mightmakesright'] = true;
// Only users with this right can edit pages in the headquarters namespace
$wgNamespaceProtection[NS_HEADQUARTERS] = array('mightmakesright');
// Optionally, give this right to sysops too (recommended)
$wgGroupPermissions['sysop']['mightmakesright'] = true;

Daniel J. Barrett
O'Reilly Author 
PDF Page 258
towards the middle of the page

The statement
-------------
If you don’t want any logo, set:
$wgLogo = false;
-------------
is not correct. This means to use the default logo.

Note from the Author or Editor:
The line of code should be changed to:

$wgLogo = '';

Anonymous 
Printed Page 280
Last line

The book says that all extension code in the chapter can be downloaded and gives a book address, but there is no link at that address for the extension code. Is there some other location where we can get a link to this code?

Note from the Author or Editor:
The reader is correct. I will arrange with the editor (Mike L) to get these code examples posted.

Gary Anderson 
Printed Page 298
The very end

The final paragraph should end with this additional sentence, if it will fit:

Message names must be lowercase.

just after the phrase "English, French, and Spanish." The word "must" should be emphasized in italics.

Note from the Author or Editor:
This is correct. If message names are not lowercase, the code will not work.

Daniel J. Barrett
O'Reilly Author 
PDF Page 328
Example 16-2

Example 16-2 uses the class 'SecureLoginPage' from Example 16-3.
All 3 times the class called incorrectly ('FancyForm' or 'SecureLogin').

Note from the Author or Editor:
1. The caption to example 16-2 should be changed from:

Example 16-2: SecureLogin.php

to:

Example 16-2: SecureLoginPage.php

2. Line 9 of example 16-2 should have the word FancyForm changed
to SecureLoginPage, and each of lines 10-12 need the word
SecureLogin changed to SecureLoginPage. There is one change per
line, for a total of four changes. The result should be:

$wgAutoloadClasses['SecureLoginPage']
= dirname(__FILE__) . '/SecureLoginPage_body.php';
$wgHooks['UserLoginForm'][] = 'SecureLoginPage::secureLogin';
$wgHooks['BeforePageDisplay'][] = 'SecureLoginPage::otherPage';

Changes to example 16-3:

1. The caption should be changed from:

Example 16-2: SecureLogin_body.php

to:

Example 16-2: SecureLoginPage_body.php

Anonymous 
Printed Page 335
Index listing

These two index entries under Symbols:

$wgAutoloadClasses, 285
$wgTitle, 300

should instead appear in index section "W", where all the other $wg... variables currently appear.

Daniel J. Barrett
O'Reilly Author