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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Potential bug? - DataObject $allowed_actions static is public not private in 3.1


Go to End


9 Posts   2298 Views

Avatar
Bonner

Community Member, 21 Posts

11 June 2014 at 2:30am

Not sure if this is intentional or not, but I might have spotted a bug in the DataObject class:

public static $allowed_actions = null;

Shouldn't this be:

private static $allowed_actions = null;

As per the documentation:
http://doc.silverstripe.org/framework/en/changelogs/3.1.0#statics-in-custom-page-classes-need-to-be-private

Avatar
swaiba

Forum Moderator, 1899 Posts

11 June 2014 at 3:52am

Hi Bonner,

Is this is a bug please raise it on github where issues are now tracked.

I doubt it though and I think the advice is for subclasses of it, not the root object itself.

Avatar
Bonner

Community Member, 21 Posts

11 June 2014 at 7:50pm

Well the subclass can't have a private static $allowed_access can it?

That is the problem.

Hence why I'm asking if the community thinks this is a bug or not.

Avatar
camfindlay

Forum Moderator, 267 Posts

11 June 2014 at 8:12pm

Hi Bonner, thanks for spotting that - as swaiba suggests, best place to log this is the issues section of the framework repository on github.

https://github.com/silverstripe/silverstripe-framework/issues?labels=&milestone=&page=1&state=open

Avatar
Bonner

Community Member, 21 Posts

11 June 2014 at 10:05pm

Hi camfindlay

Thanks for the link, I'll get it logged on github and see what is said there.

I'll post the outcome when there is one.

Thanks,
Matt

Avatar
Bonner

Community Member, 21 Posts

11 June 2014 at 10:12pm

Avatar
camfindlay

Forum Moderator, 267 Posts

11 June 2014 at 10:18pm

Much appreciated Matt.

Just a bit of house keeping, would you mind editing your original thread topic title to be more verbose please.

Part of what makes the forums useful is others using it as a knowledge tool to find similar problems. "Potential bug" might not be as useful for others as say...

"Potential bug? - DataObject $allowed_actions static is public not private in 3.1"

this to me would indicate 1) you are posing a question or some sort of discussion on something you are unsure of (use of the ?) and 2) some more insight into the possible issue which if I have wondered the same thing or had a similar query I might be more likely to jump into the conversation too.

Other than that keep up the good work, part of getting involved with SilverStripe is digging up improvements and issues, discussion and making them more transparent :)

Avatar
Bonner

Community Member, 21 Posts

12 June 2014 at 12:55am

Duly noted, the title in github was more verbose, although I should have really included the version number there too.

This really applies to version 3.0 too, as I checked back and the issue was in that version too.

Go to Top