Bug #100026
openModal renders content twice
0%
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:
- Throttle the network connection in the browser, "Fast 3G" is fine
- 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.
Updated by Simon Schaufelberger over 1 year ago
- Related to Bug #100025: Timing issues when rendering LiveSearch form added
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?
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.
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.