Project

General

Profile

Actions

Bug #100026

open

Modal renders content twice

Added by Andreas Kienast over 1 year ago. Updated 12 days ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2023-02-24
Due date:
% Done:

0%

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

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #100025: Timing issues when rendering LiveSearch formClosed2023-02-24

Actions
Actions #1

Updated by Simon Schaufelberger over 1 year ago

  • Related to Bug #100025: Timing issues when rendering LiveSearch form added
Actions #2

Updated by Garvin Hicking 4 months ago

  • Category set to Backend JavaScript
  • Status changed from New to Needs Feedback

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?

Actions #3

Updated by Riccardo De Contardi 22 days ago

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.

Actions #4

Updated by David Bruchmann 12 days ago

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.

Actions

Also available in: Atom PDF