Skip to content

Commit

Permalink
[TASK] FS#48007 > Fixed flux multirelation field processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Cherednichenko committed Jul 13, 2020
1 parent c1549e2 commit d0495f8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this extension will be documented in this file.

## [0.8.1] - 2020-07-13
### Fixed
- Flux multi relation field processing

## [0.8.0] - 2020-07-13
### Added
- Pages raw duplicator
Expand Down
11 changes: 9 additions & 2 deletions Classes/Duplication/Raw/ContentElementRawUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,14 @@ protected function getFieldValue(array $fieldConfig, array $field)
$value = $field['vDEF'];

if ($fieldConfig['internal_type'] === 'db') {
return (string) ($this->idsMapping[$fieldConfig['allowed']][(int) $value] ?? $value);
$ids = explode(',', $value);
$newIds = [];

foreach ($ids as $id) {
$newIds[] = $this->idsMapping[$fieldConfig['allowed']][(int) $id] ?? $id;
}

return implode(',', $newIds);
}

if (in_array($fieldConfig['type'],['radio', 'text', 'select', 'check'])) {
Expand All @@ -314,7 +321,7 @@ protected function getFieldValue(array $fieldConfig, array $field)
$newIds[] = $this->idsMapping[$fieldConfig['foreign_table']][(int) $id] ?? $id;
}

return implode(',', $newIds);
return implode(',', $newIds);
}

return $value;
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$EM_CONF[$_EXTKEY] = [
'title' => 'Site Factory',
'state' => 'beta',
'version' => '0.8',
'version' => '0.8.1',
'description' => 'Replicate and modify an existing website model very easily with a flexible and lean design. Read the code examples to understand and master all the TypoScript configuration, or extend the existing duplication processes. Based on freesite (created by Kasper Skårhøj) this project was originaly conceived by Cyril Wolfangel and is developped and maintained by Romain Canon. Join the project on https://github.com/romaincanon/TYPO3-Site-Factory',
'category' => 'module',

Expand Down

0 comments on commit d0495f8

Please sign in to comment.