5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 866 Views |
-
Overwritten publish function doesn't work in SS 2.4.0 b1

24 February 2010 at 1:35am
Following code did work just fine in SS 2.3.4:
class XYZ extends Page {
...
function publish($fromStage, $toStage, $createNewVersion = false) {
// do something
return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
}
...
}since 2.4.0 i get an error, when publishing the site:
"Save and Publish" -> "Error saving content"However the site is getting published and my custom code is getting executed...
* Did the function header of "function publish()" change?
* Do I still need to call $this->extension_instances['Versioned']->publish... ?
* Is it a bug in 2.4.0 b1?Thanks for the Input.
-
Re: Overwritten publish function doesn't work in SS 2.4.0 b1

25 March 2010 at 10:44pm
The discussion went on a bit at http://open.silverstripe.org/ticket/5112. @mco: If you ask on the forum *and* open a ticket at the same time, please make sure to link between both, otherwise people will try to solve stuff in two different places...
-
Re: Overwritten publish function doesn't work in SS 2.4.0 b1

8 April 2010 at 2:56am
sorry. forgot about the posting.
However, using onBeforeWrite solves the issue and seems to be the propper way.
| 866 Views | ||
|
Page:
1
|
Go to Top |


