I am getting a getviewer error after moving some of my pages one level deeper the site tree.
I have had to change some code from using director::param() to using Controller::curr()->urlParams due to the params being uncorrectly read once being nested one level lower, but this code now seems fine.. I am note sure where this error is coming from.
It might be worth noting that ImageResource extends dataobject, and that this view was being rendered with the template for 'gallery1' before. 'gallery1' is a GalleryPage which extends Page, 'Galleries' and 'fashion' are galleryHolders. The new level added is 'fashion'
Here is the actual error.
I am hoping by getting a better understanding of getviewer I can work this out.
[User Error] Uncaught Exception: Object->__call(): the method 'getviewer' does not exist on 'ImageResource'
GET /galleries/fashion/gallery1/Display/1
Line 724 in C:\xampp\htdocs\vhost\mysite\httpdocs\sapphire\core\Object.php
Source
715
716 default :
717 throw new Exception (
718 "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
719 );
720 }
721 } else {
722 // Please do not change the exception code number below.
723
724 throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'", 2175);
725 }
726 }
727
728 // -----------------------------------------------------------------------------------------------------------------
729
730 /**
Trace
* Object->__call(getViewer,Array)
* ImageResource->getViewer(Display)
Line 155 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 199 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 184 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 184 of ContentController.php
* ContentController->handleRequest(SS_HTTPRequest)
Line 67 of ModelAsController.php
* ModelAsController->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
* Director::direct(/galleries/fashion/gallery1/Display/1)
Line 127 of main.php
Appreciate any insight you might have.