I have set up my DOAP (it is a book object) so that it is Versioned. But now, when you click Publish it doesn't save the current state of the form but reverts it to the previous. I can't get my head around it! Have you come across this?
The correct data is being sent in the POST request.
The doPublish method on the DOAP is being called.
But $this inside doPublish does not show the changes.
Moreover the Publish button is then disappearing and most recently all the buttons have disappeared. Any ideas?
If I just do a save then it saves it OK.
After some digging around, I think that your VersionedGridFieldDetailForm_Controller#publish method doesn't actually save the incoming data. The save method does this:
I have set up my DOAP (it is a book object) so that it is Versioned. But now, when you click Publish it doesn't save the current state of the form but reverts it to the previous. I can't get my head around it! Have you come across this?
The correct data is being sent in the POST request. The doPublish method on the DOAP is being called. But $this inside doPublish does not show the changes. Moreover the Publish button is then disappearing and most recently all the buttons have disappeared. Any ideas?
If I just do a save then it saves it OK.
After some digging around, I think that your VersionedGridFieldDetailForm_Controller#publish method doesn't actually save the incoming data. The save method does this:
But the publish method just calls
Perhaps it should call save first or do something similar to save?