Jump to:

23476 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » HELP! [Notice] Trying to get property of non-object

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 2549 Views
  • dataforlife
    Community Member
    10 Posts

    HELP! [Notice] Trying to get property of non-object Link to this post


    i added a new usergroup and new user in my Backend. After that i logged out and tried to login as a new user of the new usergroup.
    But than i got this massege in my browser:


    [Notice] Trying to get property of non-object
    GET /silverstripe/admin/

    Line 243 in C:\xampp\htdocs\silverstripe\sapphire\security\Group.php

    234 return $familyIDs;
    235 }
    237 /**
    238 * Returns an array of the IDs of this group and all its parents
    239 */
    240 public function collateAncestorIDs() {
    241 $parent = $this;
    242 while(isset($parent)) {
    243 $items[] = $parent->ID;
    244 $parent = $parent->Parent;
    245 }
    246 return $items;
    247 }
    249 /**


    * Group->collateAncestorIDs()
    Line 669 of Member.php
    * Member->Groups()
    Line 257 of Permission.php
    * Permission::groupList(3)
    Line 160 of Permission.php
    * Permission::checkMember(Member,CMS_ACCESS_CMSMain)
    Line 86 of LeftAndMain.php
    * LeftAndMain->canView()
    Line 123 of LeftAndMain.php
    * LeftAndMain->init()
    Line 84 of CMSMain.php
    * CMSMain->init()
    Line 110 of Controller.php
    * Controller->handleRequest(HTTPRequest)
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct(/admin/)
    Line 118 of main.php


    What is wrong? What can i do now?

    Thanks a lot...

  • Mo
    Community Member
    508 Posts

    Re: HELP! [Notice] Trying to get property of non-object Link to this post

    Usually I get this error if i am trying to access the methods, variables of an empty dataobject set.

    Seems odd that this error would be generated by the core CMS. Is the group you created a root level group? Or is it a child of another group?

    Also, what version of SS are you running? Have you got any additional modules?



  • dataforlife
    Community Member
    10 Posts

    Re: HELP! [Notice] Trying to get property of non-object Link to this post

    Hi Mo,

    thanks for posting.

    I found a soluiton. I hope its the right one. But now it works again.

    I changed the parameter of ParentID from 2 to 0 in the "group" table (database). And now it works.

    But ist this normal, that one "wrong" parameter knock out the whole CMS incl. Backend??
    I just added an new usergroup and added a new user to the group.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.