Skip to content

Commit

Permalink
Fixed #7
Browse files Browse the repository at this point in the history
  • Loading branch information
freimutt committed Jan 30, 2020
1 parent 3ae82cb commit f6f526c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.2.2.1 - 2020-01-29
### Fixed
- Fixed a bug when selecting entries in multisite environment
- Fixed a bug when saving without list item title not setting linked item title

## 1.2.2 - 2020-01-29
### Fixed
- Fixed a bug when editing a list item when there are zero field layout tabs
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dutchheight/craft-navie",
"description": "Navigation plugin for Craft CMS 3",
"type": "craft-plugin",
"version": "1.2.2",
"version": "1.2.2.1",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/ListsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ private function populateListItemModel(ListItem $listItem)
$listItem->setFieldValuesFromRequest($fieldsLocation);

if (empty($listItem->title) && $listItem->elementId !== null) {
if ($element = Craft::$app->getElements()->getElementById($listItem->elementId)) {
if ($element = Craft::$app->getElements()->getElementById($listItem->elementId, null, $listItem->siteId)) {
$listItem->title = $element->title;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/templates/listitems/_fields.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
name: 'elementId',
elementType: linkType.type,
elements: [listItemElement],
criteria: { 'siteId': listItem.siteId },
limit: 1
}) }}
{% endif %}
Expand Down

0 comments on commit f6f526c

Please sign in to comment.