Hello all,
We are using SS 3.0 and I'm having some problems with versioning on new page types.
When I create a new page that extends "Page" and add new fields to it they don't seem to version correctly in the CMS. Using just the default "Page" type seems to version okay. Say I create a new pagetype of TestPage that extends page.
class TestPage extends Page {
public static $db = array(
'Test' => 'HTMLText',
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeFieldFromTab("Root.Main","Content");
$fields->addFieldToTab('Root.Main', new HTMLEditorField('Test', 'Test'));
return $fields;
}
I then create a new page in the CMS with a page type of TestPage, add some content to the "test" area, and the save & publish everything is all dandy. Now I Modify the content again and this time hit save draft, the draft is saved and all is good. Next if I hit
cancel draft changes, it prompts me if i'm sure, I say yes, and it says it was reverted, but if you look at the content it infact was not reverted...
The same holds true for the versioning. If I look at the history on my new test page all of the versions show they are the same.
Am I missing something obvious here? Do I need to add something to the new page type to version the new content area correctly? What is also strange is that if I look at the content in the database in the versions table it seems to show the correct values for each version, but not when looking through the cms.
This is actually a pretty serious problem right now because we have live sites that wont version.