Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

mollom breaks site login


Go to End
Reply


2 Posts   1401 Views

Avatar
emil.blume

Community Member, 11 Posts

20 December 2009 at 4:37am

Edited: 20/12/2009 4:47am

After I installed mollom and spamprotection, adding to mysite/_config.php and flushing I cant login, even in forums I cant login getting following error:

[Warning] ViewableData_Customised::obj() 'Content' was requested from the array data as an object but it's not an object. I can't cast it.
GET /Security/login

Line 990 in /home/verblorg/public_html/sapphire/core/ViewableData.php
Source

981 			return $val;
982 		} else {
983 			return $this->obj->XML_val($fieldName, $args, $cache);
984 		}
985 	}
986 	
987 	function obj($fieldName, $args = null, $forceReturnObject = false) {
988 		if(isset($this->extraData[$fieldName])) {
989 			if(!is_object($this->extraData[$fieldName])) {
990 				user_error("ViewableData_Customised::obj() '$fieldName' was requested from the array data as an object but it's not an object.  I can't cast it.", E_USER_WARNING);
991 			}
992 			return $this->extraData[$fieldName];
993 		} else {
994 			return $this->obj->obj($fieldName, $args, $forceReturnObject);
995 		}
996 	}

Trace

    * ViewableData_Customised::obj() 'Content' was requested from the array data as an object but it's not an object. I can't cast it.
      Line 990 of ViewableData.php
    * ViewableData_Customised->obj(Content)
      Line 254 of .cache.home.verblorg.public_html.themes.BrightSide1.templates.Page.ss
    * include(/home/verblorg/public_html/silverstripe-cache/.cache.home.verblorg.public_html.themes.BrightSide1.templates.Page.ss)
      Line 360 of SSViewer.php
    * SSViewer->process(ViewableData_Customised)
      Line 773 of ViewableData.php
    * ViewableData->renderWith(Array)
      Line 363 of Security.php
    * Security->login(HTTPRequest)
      Line 159 of Controller.php
    * Controller->handleAction(HTTPRequest)
      Line 129 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
      Line 119 of Controller.php
    * Controller->handleRequest(HTTPRequest)
      Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
      Line 121 of Director.php
    * Director::direct(/Security/login)
      Line 118 of main.php

Avatar
emil.blume

Community Member, 11 Posts

20 December 2009 at 5:13am

Edited: 20/12/2009 5:14am

Pretty cool I solved this with the help of silverstripe IRC channel
See log attached:

(16:06:00) User: I cant login to my SS
(16:06:41) joshy: oh?
(16:06:47) joshy: have you put a default admin in?
(16:07:14) joshy: Security::setDefaultAdmin('admin','password');
(16:09:14) User: [Warning] ViewableData_Customised::obj() 'Content' was requested from the array data as an object but it's not an object. I can't cast it.
(16:09:25) User: there is no need for a default admin
(16:09:32) User: or is it?
(16:10:54) jam13 [n=jamie@host.local] hat den Raum betreten.
(16:11:20) jam13 hat den Raum verlassen ("Leaving.").
(16:11:43) User: I just trief it with Security::setDefaultAdmin('admin','password');
(16:11:46) User: same error
(16:52:30) joshy: that error is nothing to do with logging in
(16:52:43) joshy: can you http://www.pastebin.org the code around that line?
(16:55:30) User: joshy: the full error is pasted at http://www.silverstripe.org/all-other-modules/show/275796#post275796
(16:56:04) User: I will have a look at Line 990 in /home/verblorg/public_html/sapphire/core/ViewableData.php
(16:57:53) User: there the code is
(16:57:55) User: /**
(16:57:55) User: * Object-casting information for class methods
(16:57:55) User: * @var mixed
(16:57:55) User: */
(16:57:55) User: public static $casting = array(
(16:57:55) User: 'BaseHref' => 'Varchar',
(16:57:55) User: 'CSSClasses' => 'Varchar',
(16:57:55) User: );
(16:58:37) joshy: what is line 254 of cache.home.verblorg.public_html.themes.BrightSide1.templates.Page.ss
(16:58:38) joshy: ?
(16:58:56) User: mompl
(17:01:10) User: $val .= $item->obj("Content")->XML_val("LimitWordCount",array("199"),true) ;
(17:01:27) joshy: ok
(17:01:36) joshy: i have no idea without having a good route around
(17:01:39) joshy: i assume you have googled?
(17:01:51) User: by the way, mollom is working perfect on blog pages
(17:01:59) User: yes I googled
(17:02:14) joshy: meh
(17:02:25) User: just another problem whren using ImageGallery
(17:02:32) User: but not with login
(17:06:43) User: hmmm mompl
(17:09:37) User: solved
(17:09:55) User: thank you for you're hint with cache file
(17:10:20) User: I used $Content.LimitWordCount(199) in Page.ss