Issue Bug Closed

#100026Modal renders content twice

Andreas Kienast 02/24/23, 14:21 updated 11/01/26, 10:32

Description

It seems there is an issue regarding lifecycle events in the modal component. It’s reproducible with any modal that loads its content by an AJAX request:

  1. Throttle the network connection in the browser, “Fast 3G” is fine
  2. Open said modal, e.g. “+ Content” in page module

The endpoint is requested twice, therefore the `modal-loaded` event is triggered twice. This is also an issue for fixing #100025 gracefully.

Reviews 0

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

History 7

  1. Garvin Hicking commented and changed category status New Needs Feedback <span data-processor="relativetime" data-value="2024-07-31T14:27:02+00:00" > 07/31/24, 14:27 </span>

    At least in v13 I cannot seem to reproduce this (network set to “3G” and “2x CPU throttling”), can you say if it still applies?

  2. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-11-01T10:21:28+00:00" > 11/01/24, 10:21 </span>

    I think this is still reproducible even on version 14 (latest main) with the following steps:

    1. Open TYPO3 backend
    2. Page module > go to a page
    3. Open Chrome Dev Tools (I’m using Chrome)
    4. Go to “Network Tab“
    5. Select throttling “3G” or “Slow 4G“
    6. Filter the network log table with “Fetch/XHR“
    7. Clean up the network log
    8. Click on the “New Content” button on one of the columns

    Results:

    on the network log table, you will see TWO rows beginning with “new?token…..”

    Please note that if you disable the throttling the issue does not occur.

  3. David Bruchmann commented <span data-processor="relativetime" data-value="2024-11-11T08:40:35+00:00" > 11/11/24, 08:40 </span>

    The clipboard has a similar issue: https://forge.typo3.org/issues/97317, but while I just mention it, I think the solutions differ very much, so I stick to this bug only.

    The advisable way is probably to work with a promise, and proceed when this is satisfied.
    I’m not sure how this behaves in combination with Ajax though.

  4. Andreas Kienast commented and changed status Needs Feedback New <span data-processor="relativetime" data-value="2025-04-28T05:39:43+00:00" > 04/28/25, 05:39 </span>

    Garvin Hicking wrote in #note-2:
    > At least in v13 I cannot seem to reproduce this (network set to “3G” and “2x CPU throttling”), can you say if it still applies?

    I just tested this again in main, the issue is still present (tested with Slow 3G). I’ve tested this with the Live Search, the form is loaded twice.

  5. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-11-01T09:18:31+00:00" > 11/01/26, 09:18 </span>

    I can’t reproduce that in main, can you recheck latest 14/main?