Error (ERROR_BAD_PARAMETER) : Class MyPageView not defined in template1.MyPage

jtenney

Joined: 2008-04-28
Posts: 5
Posted: Tue, 2008-05-27 13:57

So I am going through this tutorial here - http://codex.gallery2.org/Gallery2:Module_Development_Tutorial - and I can't get it to work. The problem is with the MyPage.inc file. I have the following class in the file: class MyPageView extends GalleryView {//Tutorial Code } ?>
This is not working however. When I try to visit the page (http://nimfahtography.com/main.php?g2_view=template1.MyPage) I see all of the code from the the MyPage.inc file printed out at the top and then I see this error

Error (ERROR_BAD_PARAMETER) : Class MyPageView not defined in template1.MyPage
* in modules/core/classes/GalleryView.class at line 194 (GalleryCoreApi::error)
* in main.php at line 318 (GalleryView::loadView)
* in main.php at line 94
* in main.php at line 83
System Information
Gallery version 2.2.4
PHP version 5.2.5 cgi-fcgi
Webserver Apache
Database mysql 5.0.45-log
Toolkits Gd
Operating system Linux p3slhjava06.shr.phx3.secureserver.net 2.4.21-53.ELsmp #1 SMP Wed Nov 14 03:54:12 EST 2007 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

If I move the class declaration from MyPage.inc into the module.inc file and visit the sam URL, then everything shows up great and as I would expect. Why would this be happening?