mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
elofgren: BUGFIX: Fix "Fatal error: Call to a member function Actions() on a non-object in LeftAndMain?.php on line 489" error encountered after creating a new page and clicking "Save & Publish".
This bug was caused by r40178. (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42085 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c0a7eba5ab
commit
c09e518635
@ -487,11 +487,9 @@ JS;
|
||||
if (isset($urlParams['publish']) && $urlParams['publish'] == 1) {
|
||||
$this->performPublish($record);
|
||||
// BUGFIX: Changed icon sometimes shows after "Save & Publish" button is clicked http://support.silverstripe.com/gsoc/ticket/31
|
||||
if(substr($id,0,3) != 'new') {
|
||||
$publishedRecord = DataObject::get_one($className, "`$className`.ID = $id");
|
||||
} else {
|
||||
$publishedRecord = $this->getNewItem($id, false);
|
||||
}
|
||||
$record->setClassName( $record->ClassName );
|
||||
$newClass = $record->ClassName;
|
||||
$publishedRecord = $record->newClassInstance( $newClass );
|
||||
return $this->tellBrowserAboutPublicationChange($publishedRecord, "Published '$record->Title' successfully");
|
||||
} else {
|
||||
// BUGFIX: Changed icon only shows after Save button is clicked twice http://support.silverstripe.com/gsoc/ticket/76
|
||||
|
Loading…
Reference in New Issue
Block a user