Bug #82016
closedWizards add still not working with MM
0%
Description
It seems the new version 7.6.21 does not fix this bug (https://forge.typo3.org/issues/76863) as mentioned in the changelog (https://wiki.typo3.org/TYPO3_CMS_7.6.21).
My TCA for the add-wizard is configured as in step 2 described here: https://forge.typo3.org/issues/81824 .
Updated by XIMA MEDIA GmbH over 7 years ago
- Related to Bug #76863: MM Relation with selectMultipleSideBySide Field - Add wizard resets the MM Relation added
Updated by XIMA MEDIA GmbH over 7 years ago
- Is duplicate of Bug #81824: Wizards add not working with MM added
Updated by Fabian Bett over 7 years ago
I can confirm this problem on Typo3 8.7.4 LTE
A dirty quick fix:
File: sysext\backend\Classes\Controller\Wizard\AddController.php
Method: main
SEARCH:
$currentValue = $currentParentRow[$this->P['field']];
if (is_array($currentValue)) {
$currentValue = implode(',', array_column($currentValue, 'uid'));
}
REPLACE:
$currentValue = $currentParentRow[$this->P['field']];
if (is_array($currentValue)) {
$arrayToImplode = array_column($currentValue, 'uid');
if(count($arrayToImplode) == 0 && count($currentParentRow[$this->P['field']]) > 0) {
$arrayToImplode = $currentValue;
foreach($arrayToImplode as $key => $elementId) {
if(!is_array($elementId) && !is_object($elementId))
$arrayToImplode[$key] = $this->table . '_' . $elementId;
}
}
$currentValue = implode(',', $arrayToImplode);
}
I think, there is also a conceptual problem:
A wizard controller should not be able to modify a relationship as much as it is implemented here - especially it should not be necessary to convert an array to a string and back.
Updated by XIMA MEDIA GmbH over 7 years ago
Thank you for your response, Fabian.
We'll see what we can do.
Updated by Kevin Ditscheid about 7 years ago
FYI: I added the hotfix by Fabian to the extension I wrote earlier in https://forge.typo3.org/issues/76863#note-5 for this project of mine, but I was unable to replicate the problem, so this is just a shot into the blue I must admit.
Could someone post a reproducible test case for this?
The updated add_wizard hotfix extension can be found on github and packagist:
https://packagist.org/packages/kevinditscheid/add-wizard
Updated by Riccardo De Contardi about 7 years ago
- Related to Bug #81855: Add new record wizard fails on Save&Close with "select" field and MM setted added
Updated by Susanne Moog almost 7 years ago
- Category changed from DataHandler aka TCEmain to FormEngine aka TCEforms
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55779
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55779
Updated by Gerrit Code Review almost 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55779
Updated by Kevin Ditscheid over 6 years ago
- Has duplicate Bug #82461: Backend/TCA: fieldControl->addRecord removes old relations after creating an new entry in the foreign table for the new relation added
Updated by Riccardo De Contardi over 6 years ago
- Status changed from Under Review to Closed
@Kevin no-lastname-given Ditscheid thank you for your feedback - closed.
If you think that this is the wrong decision or experience the issue again, please reopen it or open a new issue with a reference to this one.