Review main Merged

67254[BUGFIX] Initialize module menu only if present in HTML

Martin Kutschker CR +2 V +2 Easy +6 −2 updated 12/29/20, 17:11

Commit message

Loading the module menu on any page caused a JavaScript error.
The fix prevents this by checking if the necessary HTML
for the module menu is found in the HTML.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Richard Haeser +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Riccardo De Contardi +1
    • Richard Haeser +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 911

  1. Martin Kutschker uploaded patch set 1 12/28/20, 09:47

  2. TYPO3com voted on patch set 1 V +1 12/28/20, 09:56 Completed build in 09m 23s on Mon, 28 Dec, 09:56 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8470

  3. Benjamin Franzke commented on patch set 1 CR -1 12/28/20, 18:06

    The change to ModuleMenu is fine and should be done. Still, please see https://review.typo3.org/c/Packages/TYPO3.CMS/+/65795 and https://forge.typo3.org/issues/92350 for reference, which fixes this differently. Anyway, both fixes are useful, I just wouldn't add runtime checks to RegularEvent.ts.

    RegularEvent.ts:28

    I think we should avoid runtime checks like these. It is the compiler's task, we shouldn't end up doing this all over the place. We should rather aim for activating the typescript option strictNullChecks: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html#--strictnullchecks
  4. Martin Kutschker commented on patch set 1 12/28/20, 20:53

    Reply

    Dynamic imports are the way to go.

    RegularEvent.ts:28 Reply

    I was unsure if it is a good idea to add the check here or in the calling code. I added it to get opiions on that matter. Personally I'm all for strict TS checks, but there is the argument not to set the barrier for contribution too high.
  5. Martin Kutschker uploaded patch set 2 12/29/20, 09:43

  6. TYPO3com voted on patch set 2 V +1 12/29/20, 09:53 Completed build in 09m 24s on Tue, 29 Dec, 09:53 AM Test Summary: 32540 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8488

  7. Riccardo De Contardi voted on patch set 2 V +1 12/29/20, 10:01

  8. Richard Haeser voted on patch set 2 V +1 CR +1 12/29/20, 14:13

  9. Benjamin Franzke voted on patch set 2 V +2 CR +2 12/29/20, 17:10

  10. Benjamin Franzke commented on patch set 2 12/29/20, 17:11

    RegularEvent.ts:28 Reply

    Yea, well, the strongest argument is, that we go >500 violations atm, and it requires some amount of work to fix. Anyway, this is good to go in, now.
  11. Benjamin Franzke merged patch set 3 12/29/20, 17:11