Project

General

Profile

Actions

Bug #82016

closed

Wizards add still not working with MM

Added by XIMA MEDIA GmbH over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-08-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

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 .


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #76863: MM Relation with selectMultipleSideBySide Field - Add wizard resets the MM RelationClosedThomas Hohn2016-06-29

Actions
Related to TYPO3 Core - Bug #81855: Add new record wizard fails on Save&Close with "select" field and MM settedClosed2017-07-13

Actions
Is duplicate of TYPO3 Core - Bug #81824: Wizards add not working with MMClosed2017-07-10

Actions
Has duplicate TYPO3 Core - Bug #82461: Backend/TCA: fieldControl->addRecord removes old relations after creating an new entry in the foreign table for the new relation Closed2017-09-12

Actions
Actions #1

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
Actions #2

Updated by XIMA MEDIA GmbH over 7 years ago

  • Is duplicate of Bug #81824: Wizards add not working with MM added
Actions #3

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.

Actions #4

Updated by XIMA MEDIA GmbH over 7 years ago

Thank you for your response, Fabian.

We'll see what we can do.

Actions #5

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

Actions #6

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
Actions #7

Updated by Susanne Moog almost 7 years ago

  • Category changed from DataHandler aka TCEmain to FormEngine aka TCEforms
Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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
Actions #12

Updated by Kevin Ditscheid over 6 years ago

Solved in #82461 please close

Actions #13

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.

Actions

Also available in: Atom PDF