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

Editors can not edit own DataObjects


Go to End


7 Posts   2076 Views

Avatar
spankmaster79

Community Member, 46 Posts

26 March 2011 at 3:33am

Edited: 26/03/2011 4:00am

Hi,

my problem is that editors can't edit or create certain DataObjects I created for page I built. Some are editable and some aren't.... And if I switch language, it's a multilanguage site, then the Input fields don't even appear......

Examples:
I have a class for links to display a linklist

- German -> Editors can edit and create
- Englisch -> No fields in popup

Other class that manages Downloads

- German -> Show: yes, edit & create: no
- Englisch -> No fields in popup

Could anybody hint me to where the problem may be?

Greetz
Spanky

Avatar
swaiba

Forum Moderator, 1899 Posts

26 March 2011 at 4:03am

"Edit DataObject" - I assume you don't mean the source code (joking!).

Do you mean with extra stuff you've added to Sitetree objects and in the SiteTree/Pages section or with ModelAdmin or with something else?

Avatar
spankmaster79

Community Member, 46 Posts

26 March 2011 at 4:47am

I mean objects derived from DataObject that I handle with a DataObjectManager in a Page.

On debugging I could find out that in TableListField.php function Can($mode) returns false on $this->isReadOnly().

But why does it work in German then???

Avatar
swaiba

Forum Moderator, 1899 Posts

26 March 2011 at 5:15am

Edited: 26/03/2011 5:18am

Ahh - so best if you mention that and I'd suggest posting into the DataObjectManager part of the forum because you are looking at getting help with an external module (one so popular it's got it's own section!) it's the only place I see UncleCheese post...

of course, DOM may implement things like ModelAdmin and that may mean this would be the fix...
http://silverstripe.org/data-model-questions/show/6059?start=0

Avatar
spankmaster79

Community Member, 46 Posts

26 March 2011 at 5:28am

Edited: 26/03/2011 5:31am

Thx for the info. Just found out myself that it might have to do something with it. I'll try it there, but I don't know why DataObjectManager calls ComplexTableField to check in TableListField........

And I had created all can.....() CRUD functions with a return true value. But they don't seem to get called-.....

Avatar
swaiba

Forum Moderator, 1899 Posts

26 March 2011 at 5:53am

I don't know why DataObjectManager calls ComplexTableField to check in TableListField........

DOM extends the ComplexTablefield, it doesn't re-invent it

Avatar
spankmaster79

Community Member, 46 Posts

26 March 2011 at 5:58am

whoooops... just been blind for a second ;-)