Jump to:

1135 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Strange PHP addPermissions error

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1560 Views
  • D.K.
    Avatar
    Community Member
    20 Posts

    Strange PHP addPermissions error Link to this post

    I'm currently on the nestedurls SVN branch and today did an 'svn up' of cms, sapphire, core, jscript, forum, and blog (to r71786). I tried to load back into SS and get the error: "Fatal error: Call to undefined method MemberTableField::addpermissions() in /home/****/****/ss/forum/_config.php on line 9". There is no method addpermissions. There is a method addPermissions. The strange thing is that the config file references addPermissions, but somewhere along the line that gets changed to addpermissions, which method does not exist. Can someone please tell me how this can be fixed?

    Thanks in advance.

    P.S. Now that I think of it, I cannot find the text addPermissions in any files other than forum/_config.php. What's going on?

  • D.K.
    Avatar
    Community Member
    20 Posts

    Re: Strange PHP addPermissions error Link to this post

    I just realized, the addPermissions method does not exist in the MemberTableField.php file at all. After reading through the docs, I found out that that method is deprecated, and seems to now have been completely removed. Therefore, the forum's module's _config.php should be update to reflect the deprecated function.

    I'll file a bug report tommorrow.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Strange PHP addPermissions error Link to this post

    Hi D.K.

    This has been re-added in the trunk branch, http://open.silverstripe.com/changeset/71594/modules

    When ajshort merges trunk back to nestedurls branch, this error should go away.

    The addPermissions() method doesn't actually do anything anyway, because permissions are set when MemberTableField is instantiated.

    You're right, the forum module needs to be updated. This call to MemberTableField should be removed in forum/trunk because it's deprecated.

    Please file a ticket on open.silverstripe.com and we'll update the forum module accordingly.

    Cheers!
    Sean

  • D.K.
    Avatar
    Community Member
    20 Posts

    Re: Strange PHP addPermissions error Link to this post

    Hi Sean,

    Thanks for commiting the fix so quickly!

    I filed a branch remerge request to ajshort at: http://open.silverstripe.com/ticket/3546 (for those who haven't updated to latest forum trunk).

    1560 Views
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.