p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 (http://p2p.wrox.com/forumdisplay.php?f=414)
-   -   error in the dashboard pages code (http://p2p.wrox.com/showthread.php?t=85791)

zoro12 November 23rd, 2011 05:09 PM

error in the dashboard pages code
 
note : "beware this code was downloaded recently from here (wrox.com) its not the same code present in the book its the downloadable version"
This is the error i have :

A PHP Error was encountered
Severity: Notice

Message: Undefined index: category_id

Filename: views/admin_pages_home.php

Line Number: 22

---------------------------------------------------
help please.
thanks.

zoro12 November 23rd, 2011 05:26 PM

i changed the category_id to just id and i have new error :
 
the new error :

A PHP Error was encountered
Severity: Notice

Message: Undefined variable: cats

Filename: views/admin_pages_home.php

Line Number: 25

i am wondering what categories has to do with the pages !

zoro12 November 24th, 2011 01:03 PM

i have solved the error but i dont know the author intention in this !!!!!!!!!!!!!...
 
i have solved the error issue by commenting out the code that caused the error in the view file admin_pages_home.php :

echo "<td>";
if (!preg_match("/\.html$/",$list['path'])){
$list['path'] .= ".html";
}
echo "/". $list['path'];
// if ($category['id'] == 0){
// echo "/". $list['path'];
// }else{
// echo "/". $cats[$list['id']]. "/". $list['path'];
// }
echo "</td>";

mr myer can you please explain to us how to solve this error without commenting out this code ?
what you intended to do with the page path we dont understand ?

thanks.


All times are GMT -4. The time now is 01:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.