Issue:Mode=category
From FollowTheScore
Description: | mode=category, CategoryPage.php is included, but file cannot be found. |
Extension / Version: | DPL / 1.8.9 |
Type / Status: | Bug / open |
Problem
Error: The file CategoryPage,php included at DPL.php line 1216 cannot be found.
- It works when i copied the file to the DPL extension folder.
not very clean. couldn't fix it with relative path,
Then an error occurs when no results, "$aArticles not defined".
- I fixed that by putting the whole lot in an if ($iCount>0) statement.
Maybe nicer with an isset statement. Anyway, i have it working now.
function formatCategoryList($iStart, $iCount) { for($i = $iStart; $i < $iStart + $iCount; $i++) { $aArticles[] = $this->mArticles[$i]->mLink; $aArticles_start_char[] = $this->mArticles[$i]->mStartChar; $this->filteredCount = $this->filteredCount + 1; } if ($iCount>0) { require_once ('CategoryPage.php'); if ( count ( $aArticles ) > ExtDynamicPageList::$categoryStyleListCutoff ) { return "__NOTOC____NOEDITSECTION__".CategoryViewer::columnList( $aArticles, $aArticles_start_char ); } elseif ( count($aArticles) > 0) { // for short lists of articles in categories. return "__NOTOC____NOEDITSECTION__".CategoryViewer::shortList( $aArticles, $aArticles_start_char ); } } return ''; }