Skip to content

Commit

Permalink
Fixes issue when saving pages without a folder element [#1163]
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Jul 17, 2017
1 parent fe7c034 commit a7a8b7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.5.1
## 07/xx/2017

1. [](#bugfix)
* Fixes issue when saving pages without a `folder` element [#1163](https://github.com/getgrav/grav-plugin-admin/issues/1163)

# v1.5.0
## 07/16/2017

Expand All @@ -7,7 +13,7 @@
* Fixed fetch issue throwing error when request not completed and while unloading the page [#1301](https://github.com/getgrav/grav-plugin-admin/issues/1301)
* Fixed ordering when > 100 pages [grav#1564](https://github.com/getgrav/grav/pull/1564)
* Fixed Lists issue when reindexing, causing Radio fields to potentially lose their `checked` status ([#1154](https://github.com/getgrav/grav-plugin-admin/issues/1154) | related: [1d55ffc](https://github.com/getgrav/grav-plugin-admin/commit/1d55ffc616125047f245efe9f2180ef2c16b4949))

# v1.5.0-rc.4
## 07/05/2017

Expand Down
2 changes: 1 addition & 1 deletion classes/admincontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public function taskSave()
/** @var Page $obj */
$obj = $this->admin->page(true);

if (!$data['folder']) {
if (!isset($data['folder']) || !$data['folder']) {
$data['folder'] = $obj->slug();
$this->data['folder'] = $obj->slug();
}
Expand Down

0 comments on commit a7a8b7f

Please sign in to comment.