90039[BUGFIX] Prevent js error in workspace preview
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Anja Leichsenring +1
- Benni Mack +1
-
Verified V +2 Done
- Christian Kuhn +2
- Anja Leichsenring +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 1
Review log 67
-
Christian Kuhn uploaded patch set 1 07/09/25, 18:35
-
core-ci voted on patch set 1 V +1 07/09/25, 18:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81537
-
Benni Mack voted on patch set 1 CR +1 V +1 07/10/25, 08:26
-
Anja Leichsenring voted on patch set 1 CR +1 V +1 07/10/25, 08:41
-
Christian Kuhn voted on patch set 1 CR +2 V +2 07/10/25, 09:00
-
Christian Kuhn merged patch set 2 07/10/25, 09:09
-
Benjamin Franzke commented on patch set 2 07/10/25, 10:16
FYI: Ollys suggestion in https://forge.typo3.org/issues/107060#note-1 was not too bad, if JavaScript throws an error, JavaScript should ideally be fixed. I understand that this one was a bit "tricky", since our JS is too lax with implying that selectors will always be found all over the place (classic HTML-JS synchronisation drama), so it seems like HTML *has* to provide those elements. But to be correct: If there is no mode to be chosen, there is no sense in providing a semi-functional html element that provides only a "none"-mode only to workaround broken JS. Also there are still warnings left which are related to this case when there is not liveUrl (since the slider input is not rendered as well): ``` regular-event.js?bus…e9201ab2ca67f5e2:13 Binding event input failed, element was not found. bindTo @ regular-event.js?bus…e9201ab2ca67f5e2:13 registerEvents @ preview.js?bust=e773…e9201ab2ca67f5e2:13 (anonymous) @ preview.js?bust=e773…e9201ab2ca67f5e2:13 Promise.then P @ preview.js?bust=e773…e9201ab2ca67f5e2:13 (anonymous) @ preview.js?bust=e773…e9201ab2ca67f5e2:13 ``` No reason to revert, but this would have been better fixed in JS. Via something like: > https://review.typo3.org/c/Packages/TYPO3.CMS/+/90042 [WIP][TASK] streamline workspace preview hydration (This is still WIP since there are more JS warnings here, since shortcut-menu.js is loaded and markup isn't present either)