Skip to content

Commit

Permalink
fix id for Accordion and Gallery (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalmoser authored Mar 23, 2022
1 parent 943537d commit 503ee5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade Notes

## Version 4.0.6
- [BUGFIX] fix id for Accordion and Gallery: save class names

## Version 4.0.5
- [BUGFIX] fix type error in `Vhs:setDataFromResource`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function action(Info $info): ?Response
if (isset($infoParams['toolboxAccordionId'])) {
$id = $infoParams['toolboxAccordionId'];
} else {
$id = uniqid('accordion-', true);
$id = str_replace('.', '', uniqid('accordion-', true));
}

$info->setParam('id', $id);
Expand Down
2 changes: 1 addition & 1 deletion src/ToolboxBundle/Document/Areabrick/Gallery/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function action(Info $info): ?Response
parent::action($info);

$infoParams = $info->getParams();
$id = $infoParams['toolboxGalleryId'] ?? uniqid('gallery-', true);
$id = $infoParams['toolboxGalleryId'] ?? str_replace('.', '', uniqid('gallery-', true));

/** @var Relations $imagesField */
$imagesField = $this->getDocumentEditable($info->getDocument(), 'relations', 'images');
Expand Down

0 comments on commit 503ee5d

Please sign in to comment.