Skip to content

Commit

Permalink
New Layout Format: Fix loading position with different key to id
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Nov 2, 2015
1 parent 778ede2 commit 48ca22c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
- Fixed regression in Layout Manager where a malformed JSON output was preventing from drag and dropping particles around (#959)
- Restored auto focus on Search fields for Icons, Fonts and Module/Widget Pickers
- Fixed deprecated use of `Twig_Filter_Function` (fixes #961)
- Fix saving two or more positions using the same key
- Fix saving two or more positions using the same key
- New Layout Format: Fix loading position with different key to id
2. [Joomla](#joomla)
3. [](#bugfix)
- Upgrading Gantry may cause `g-container` to disappear (#957)
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Gantry/Component/Layout/Version/Format2.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected function resolve($field, $scope, $parent)

$result = (object) $result;

if ($type === 'position' && !in_array($subtype, ['module', 'widget'])) {
if ($type === 'position' && !isset($result->attributes->key) && !in_array($subtype, ['module', 'widget'])) {
$result->attributes->key = $id;
}
if ($scope > 1) {
Expand Down

0 comments on commit 48ca22c

Please sign in to comment.