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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Strange PHP addPermissions error


Reply


4 Posts   1664 Views

Avatar
D.K.

Community Member, 20 Posts

12 February 2009 at 6:05pm

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?

Avatar
D.K.

Community Member, 20 Posts

12 February 2009 at 6:52pm

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.

Avatar
Sean

Forum Moderator, 922 Posts

12 February 2009 at 9:48pm

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

Avatar
D.K.

Community Member, 20 Posts

13 February 2009 at 3:52pm

Edited: 13/02/2009 4:06pm

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).