Skip to content

Commit

Permalink
Fix issue with enabling sites for sections with Neo fields not managi…
Browse files Browse the repository at this point in the history
…ng blocks per-site
  • Loading branch information
ttempleton committed Jan 26, 2019
1 parent 3b5ba1f commit 4e15c37
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.8 - 2019-01-26
### Fixed
- Fixed multi-site issue, when enabling a site for a section, where a Neo field set not to manage its blocks on a per-site basis would cause the resaving of the section's entries to fail

## 2.1.7 - 2019-01-25
### Fixed
- Fixed issue where Neo blocks would not appear on duplicated entries
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spicyweb/craft-neo",
"description": "A Matrix-like field type that uses existing fields",
"version": "2.1.7",
"version": "2.1.8",
"type": "craft-plugin",
"keywords": [
"cms",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craft-neo",
"version": "2.1.7",
"version": "2.1.8",
"description": "A Matrix-like field type that uses existing fields",
"main": "webpack.config.js",
"scripts": {
Expand Down
6 changes: 1 addition & 5 deletions src/elements/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,7 @@ public function getOwner()
elseif ($this->ownerId !== null)
{
$owner = Craft::$app->getElements()->getElementById($this->ownerId, null, $this->siteId);

if ($owner === null)
{
$this->_owner = false;
}
$this->_owner = $owner ?? false;
}

return $owner;
Expand Down

0 comments on commit 4e15c37

Please sign in to comment.