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.

General Questions

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

Editors can not edit own DataObjects


Reply

7 Posts   895 Views

Avatar
spankmaster79

26 March 2011 at 3:33am (Last edited: 26 March 2011 4:00am), Community Member, 46 Posts

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

26 March 2011 at 4:03am Forum Moderator, 1796 Posts

"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

26 March 2011 at 4:47am Community Member, 46 Posts

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

26 March 2011 at 5:15am (Last edited: 26 March 2011 5:18am), Forum Moderator, 1796 Posts

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

26 March 2011 at 5:28am (Last edited: 26 March 2011 5:31am), Community Member, 46 Posts

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

26 March 2011 at 5:53am Forum Moderator, 1796 Posts

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

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

Avatar
spankmaster79

26 March 2011 at 5:58am Community Member, 46 Posts

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