Review main Merged

75105[BUGFIX] Allow any doktype for linking beside sysfolder and recycler

Frank Nägler CR +2 V +2 Easy +6 −1 updated 07/12/22, 07:16

Commit message

Since TYPO3 version 10.4, the custom page type is not restricted
to any range of numbers.
This limitation no longer exists, and any number is allowed.

The ElementBrowserPageTreeView just now also respect this and
allows to link to other any doktype beside:
- PageRepository::DOKTYPE_RECYCLER
- PageRepository::DOKTYPE_SYSFOLDER

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1214

  1. Frank Nägler uploaded patch set 1 07/11/22, 15:49

  2. Oliver Klee commented on patch set 1 07/11/22, 15:55

    ElementBrowserPageTreeView.php:143

    I propose we move this to a constant NON_LINKABLE DOKTYPES to make the thinking behind this code more explicit.
  3. core-ci voted on patch set 1 V +1 07/11/22, 15:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28903

  4. Frank Nägler commented on patch set 1 07/11/22, 16:00

    ElementBrowserPageTreeView.php:143 Reply

    I would keep it as it is because it is a bugfix with backports to v11 and v10. My first version to fix it was a feature, so I stepped back from the first idea. If this is fixed, I would introduce a new feature to configure the linkable state for v12/main in the $GLOBALS['PAGES_TYPES'] array, example: ``` $GLOBALS['PAGES_TYPES'] = [ (string)PageRepository::DOKTYPE_BE_USER_SECTION => [ 'allowedTables' => '*', ], (string)PageRepository::DOKTYPE_SYSFOLDER => [ // Doktype 254 is a 'Folder' - a general purpose storage folder for whatever you like. // In CMS context it's NOT a viewable page. Can contain any element. 'allowedTables' => '*', 'isLinkable' => false, ], (string)PageRepository::DOKTYPE_RECYCLER => [ // Doktype 255 is a recycle-bin. 'allowedTables' => '*', 'isLinkable' => false, ], 'default' => [ 'allowedTables' => 'pages,sys_category,sys_file_reference,sys_file_collection', 'onlyAllowedTables' => false, 'isLinkable' => true, ], ]; ``` I currently create the ticket for that feature.
  5. Frank Nägler commented on patch set 1 07/11/22, 16:07

    ElementBrowserPageTreeView.php:143 Reply

  6. Oliver Klee commented on patch set 1 07/11/22, 16:10

    ElementBrowserPageTreeView.php:143 Reply

    Then at least let's please move the array to a local, well-named variable. Otherwise, it's completely unclear to the reader what the array means.
  7. Oliver Klee commented on patch set 1 07/11/22, 16:11

    ElementBrowserPageTreeView.php:143 Reply

    And I currently don't see why a bugfix should not include a new constant. Am I missing something here? Please help me out. :-)
  8. Frank Nägler commented on patch set 1 CR -1 07/11/22, 16:25

    spacer is also not linkable... will update the patch
  9. Frank Nägler uploaded patch set 2 07/11/22, 16:40

  10. Oli Bartsch commented on patch set 1 07/11/22, 16:43

    ElementBrowserPageTreeView.php:143 Reply

    Backports especially to 10.4 should be kept as simple as possible. Adding a constant is not necessary here, but just makes the patch bigger. I therefore opt in for not adding such constant here. This should be done in a separate patch for main only.
  11. core-ci voted on patch set 2 V +1 07/11/22, 16:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28910

  12. Oli Bartsch voted on patch set 2 V +1 CR +1 07/11/22, 16:54

  13. Benni Mack commented on patch set 2 V +2 CR +2 07/12/22, 07:16

    ElementBrowserPageTreeView.php:143 Reply

    I think this is a matter of taste. we don't have any rules on this. However, since we're releasing today, I proceed as is.
  14. Benni Mack merged patch set 3 07/12/22, 07:16