Fix for: uncaught exception method 'onmobiledomain' does not exist on 'Security' #7

Merged
merged 1 commit into from Feb 11, 2012

Projects

None yet

4 participants

Contributor

Hi Will and Sean,

On trying out the mobile module I received the following error when trying to access the login page. Tried on a new install of Silverstripe 2.4.5 and Silverstripe-Mobile. Attached change fixes the issue.

[User Error] Uncaught Exception: Object->__call(): the method 'onmobiledomain' does not exist on 'Security'
GET /llantwithub/Security/login?BackURL=%2Fllantwithub%2Fadmin

Line 724 in G:\localhost\llantwithub\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(onMobileDomain,Array)
Security->onMobileDomain()
Line 11 of MobileSiteTreeExtension.php
MobileSiteTreeExtension->MetaTags(<meta name="generator" content="SilverStripe - http://silverstripe.org" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> ,,,,,,)
Line 963 of Object.php
Object->extend(MetaTags,<meta name="generator" content="SilverStripe - http://silverstripe.org" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> )
Line 1256 of SiteTree.php
SiteTree->MetaTags(false)
call_user_func_array(Array,Array)
Line 693 of Object.php
Object->__call(MetaTags,Array)
Page_Controller->MetaTags(false)
call_user_func_array(Array,Array)
Line 369 of ViewableData.php
ViewableData->obj(MetaTags,Array,,1,)
Line 823 of ViewableData.php
ViewableData_Customised->obj(MetaTags,Array,,1,)
Line 823 of ViewableData.php
ViewableData_Customised->obj(MetaTags,Array,,1)
Line 446 of ViewableData.php
ViewableData->XML_val(MetaTags,Array,1)
Line 43 of .cache.themes.blackcandy.templates.Page.ss
include(C:\WINDOWS\Temp\silverstripe-cacheG--localhost-llantwithub\.cache.themes.blackcandy.templates.Page.ss)
Line 429 of SSViewer.php
SSViewer->process(ViewableData_Customised)
Line 342 of ViewableData.php
ViewableData->renderWith(Array)
Line 401 of Security.php
Security->login(SS_HTTPRequest)
Line 193 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
Director::direct(/Security/login)
Line 127 of main.php
@marijnkampf marijnkampf Fix for [User Error] Uncaught Exception: Object->__call(): the method…
… 'onmobiledomain' does not exist on 'Security' occurred after new install of Silverstripe 2.4.5 and Silverstripe-Mobile.
2ecbb66
Owner
wilr commented Jan 12, 2012

Thanks marignkampf, though from the looks of it this may just hide the smoke and not put out the fire. MobileSiteControllerExtension is added to the ContentController rather than all Controllers, @halkyon why would that be? surely it should be on all Controllers as then the module will fail for all non content controller based actions

having the same problem, the marijnkampf 's fix solve the issue.
May need to merge back to origin_master incase other run into the same problem

@halkyon halkyon merged commit e33fae2 into silverstripe:master Feb 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment