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

Draft mode for DataObject?


Go to End


12 Posts   8014 Views

Avatar
Mo

Community Member, 541 Posts

5 August 2010 at 1:00am

Also, I have posted all classes involved here: http://pastie.org/private/ciddetwtqzfxdlzcbjtvcq

Cheers,

Mo

Avatar
andy_steel

Community Member, 31 Posts

5 August 2010 at 1:18am

I solved my problem by simply adding a checkbox so the user can decide if the object will be published or not. Perhaps not a perfect solution, but it did the job for me.

Avatar
Mo

Community Member, 541 Posts

5 August 2010 at 3:14am

Hmm, thats an idea.

Its a bit more work, but you could create an extension to HiddenFormField that is responsible for publishing these DataObjects on publish?

Mo

Avatar
RuthAdele

Community Member, 21 Posts

30 April 2012 at 6:45pm

I've been able to get the versioned extension working on my DataObject! (sort of...)
$this->Fields() didn't work for me either, I was getting the same method error that someone else was getting, so I specified the DataObject I was trying to version - instead of $this->Fields, I used $this->HomepageResources() (substitute for your DataObject Class name)

So, the versioned table works if you add new entries, or if you change existing ones, HOWEVER, it does not update if I delete a entry.

Does anyone have any idea why this is happening or how to fix it?

Thanks :)

Go to Top