3237 Posts in 945 Topics by 684 members
|Go to End|
2 September 2010 at 3:45pm
I have a custom page type with a form, on the forms action I'm updating an object:
$myObj = DataObject::get_by_id("myObj", $Id);
$myObj->myProperty = 2;
But this only updates the _Live table and not the draft table, how can I update the draft table so it shows in the CMS?
2 September 2010 at 4:35pm Last edited: 2 September 2010 4:35pm
All I needed was to add $myObj->publish("Live", "Stage"); after the write() function.
Thanks to this post which I found via google and not this forum search: http://www.silverstripe.org/archive/show/5780?showPost=6157&start=8
This forum really needs a better search feature, there is lots of information but you can't get to it
2 September 2010 at 7:22pm
In the development version of the forum we now have the search powered by the much more useful sphinx search engine. Initial tests show results are better but we're still lacking an 'advanced' search form. This forum will be upgraded to include this sphinx search extension before the end of the year.
|Go to Top|