Issue Bug Closed

#82291Pasting of already deleted records should not be possible

Filipe DA COSTA 09/04/17, 18:29 updated 04/11/25, 16:44

Description

In the case where you have multiple people working on content or multiple tabs open, it’s possible to paste a CE that was already deleted.

This can leads to problems in extensions that do not expect to be called by the “processCmdmap_postProcess” hook.

For example, this leads to an issue with Flux where the “sorting” of copied content get’s messed up.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 7

  1. Oliver Hader commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2018-01-23T20:49:04+00:00" > 01/23/18, 20:49 </span>

    Can you please provide the required steps in order to reproduce this behavior?
    Or is it about the copy command to checking whether a record has been deleted? If so, this should be reproducible in a new functional test case…

  2. Filipe DA COSTA commented <span data-processor="relativetime" data-value="2018-01-24T10:34:44+00:00" > 01/24/18, 10:34 </span>

    Oliver Hader wrote:
    > Can you please provide the required steps in order to reproduce this behavior?
    > Or is it about the copy command to checking whether a record has been deleted? If so, this should be reproducible in a new functional test case…

    Yes, it’s about he copy command. It get’s executed without checking if the record is deleted.

    How you can reproduce the “processCmdmap_postProcess” on a deleted record:

    - Open a first Tab A and copy a CE
    - Open a second Tab B. The “Paste” button should be present
    - In Tab A remove de CE
    - Return to Tab B and “paste” the CE by pressing the button

    DataHandler:process_cmdmap is called and a “copy” command is executed.

    After this, the “processCmdmap_postProcess” hook is triggered but with an empty “$this->copyMappingArray” what caused the problem in flux.

    As of today, this issue was fixed in flux, but the maintainer asked me to open a ticket anyway as he thinks that the hook should not be called in the first place.

  3. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-06-09T16:45:06+00:00" > 06/09/24, 16:45 </span>

    Sorry for having picked up this one after so long time.

    I don’t know what behavior should be expected: This is the test I performed on 13.2.0-dev (latest master)

    1. Open TYPO3 backend; go to a page “Test”, create in it a CE (e.g. CType “Headline”) with headline “To be copied“
    2. On page module, click on the three dots icon and select “Copy” from the context menu => *the “paste icons” on the page sections become visible (OK)*
    3. Open a new browser tab with the same TYPO3 backend and go to another page => *the “paste icons” are still visible (OK)*
    4. Go to the first tab and delete the content element => *the “paste icons” disappear*
    5. Go to the second tab; *the “paste icons” are still present*
    6. click on one of the paste icon

    Result

    1. Nothing is copied, the copy simply does not do anything
    2. the deleted CE is listed on the Recycler module, and its pid is the one of the original page

    What would be the expected behavior? Am I missing something? Should a different test be performed?

  4. Benni Mack commented and changed status Needs Feedback Closed <span data-processor="relativetime" data-value="2025-04-11T16:44:49+00:00" > 04/11/25, 16:44 </span>

    I reproduced this – just like riccardo did with two browser tabs – and again – with one browser tab.

    Well, the reason we see it one the “currently not reloaded page” can also happen with a page itself, which get deleted/moved/etc. We’d need a fully new backend with a reactive UI (like with react) to support this.

    What TYPO3 v13 at least now does is that it a) does not show the buttons if the deleted record is in the clipboard on reload and thus is aware of it.

    So – to sum it up – with the current technology stack – this is the best we have, and that’s why I think we can close this issue.