Project

General

Profile

Actions

Bug #92610

closed

Solved - Swap with MM relations not working properly related to updated behaviour

Added by Carsten Hülsmann about 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2020-10-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hey,

If you swap an offline version to live there are some issues with the mm relations.

It tries to update MM Relations in the Datahandler like this:

function: version_remapMMForVersionSwap_execSwap

        if (is_array($this->version_remapMMForVersionSwap_reg[$id])) {
            foreach ($this->version_remapMMForVersionSwap_reg[$id] as $field => $str) {
                $str[0]->remapMM($str[1], $id, -$id, $str[2]);
            }
        }

However the id's are not "negative" anymore for authored entries. Instead it uses the actual ID's of the related entry.

I tried to switch the "-$id" with a "$swapId" but that then leads to a unique error since the mm table should only contain each relation once.
I think it might would help to add a new small function that compares existing entries first before trying to re-apply them but this would probably lead to another issue (cause the entry for the swap ID also exists).

Actions #1

Updated by Carsten Hülsmann about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Carsten Hülsmann about 4 years ago

  • Subject changed from Swap with MM relations not working properly related to updated behaviour to Solved - Swap with MM relations not working properly related to updated behaviour
  • Description updated (diff)
  • Target version deleted (Candidate for patchlevel)
Actions #3

Updated by Carsten Hülsmann about 4 years ago

  • Description updated (diff)
Actions #4

Updated by Carsten Hülsmann about 4 years ago

Update: Nevermind - the issue actually was related to a wrong table configuration (signed/unsigned of the uid_local/_foreign fields)

Actions #5

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Rejected

closed as there is no issue

Actions

Also available in: Atom PDF