Maybe I don't understand the code right but IMHO it should be as follows:
1) index.php couldn't find a page according to the given url.
2) Now staticpage plugin looks into the permalinks table and finds a page corresponding to the given (nice) url.
3) If the found page is itself defined as 404_error_page, this->error_404 shoudl be set to TRUE and $serendipity['view'] and $serendipity['viewtype'] can stay as is.
4) Else staticpage plugin should set this->error_404 to FALSE and IMHO correct $serendipity['view'] and $serendipity['viewtype'] which was set by index.php
In PHP:
Code: Select all
foreach ($pages as $page) {
if ($page['permalink'] == $nice_url) {
if ($page['is_404_page']) {
$this->error_404 = TRUE;
} else {
$this->error_404 = FALSE;
$serendipity['view'] = 'plugin';
unset($serendipity['viewtype']);
}
break;
}
}
Greg
Besides: What I wonder about is, why line 2743 reads
not