Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste of CE with FAL references on wrong location leads to data doubling #76

Closed
opi99 opened this issue Dec 10, 2020 · 0 comments · Fixed by #78
Closed

Paste of CE with FAL references on wrong location leads to data doubling #76

opi99 opened this issue Dec 10, 2020 · 0 comments · Fixed by #78

Comments

@opi99
Copy link

opi99 commented Dec 10, 2020

System: TYPO3 10.4.10
contend_defender: 3.1.0
b13/bolt: 2.0.2
b13/container: 1.2.0

What I do: I copy a content element with FAL References from one page into another page into a position, where it doesn't belong, but not first position on page.

What happens:

  • The element does not appear on his new position (correct)
  • An error flash message pops up (correct, but I got 2 for one element, hard to read for an editor)
  • The original record gets all FAL references twice (Wrong)

Why does this happen (IMHO):

  • The insert of the new record is not stopped inside the DataHandler::processCmdmap_beforeStart it gets stopped inside the DataHandler::processDatamap_beforeStart so the copy of the references gets preprocessed but not postprocessed which leads to doubling the references on the source record.
  • The CmdmapDataHandlerHook doesn't support negative target ids (beside the DatamapDataHandlerHook does this) for inserting Data after a given record on target page. (Maybe this leads to Copy&Paste of container element with children  #74 )
  • The newly introduced $backendLayoutConfiguration->getConfigurationByColPos gets the id of the source record and thinks it needs to handle this which leads to issues in b13/containers handling

What else may be wrong:

  • The BackendLayoutConfiguration::getConfigurationByColPos have a static cache on $columnConfiguration which holds configurations depending on $colPos but the result may also depend on $recordUid as this is a parameter for the hook manipulateConfiguration (Maybe the $recordId was meant as a hint/helper but b13/conteiner returns different results).
opi99 pushed a commit to extrameile/content_defender that referenced this issue Dec 10, 2020
We now support negative uids on the target while handling paste
commands.

Resolves: IchHabRecht#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant