Review main Abandoned

77700[FEATURE] Additional parameters for shortcuts

Guido Schmechel CR 0 V -1 Hard +300 −25 updated 12/09/25, 09:40

Commit message

The field pages.shortcut is changed to the TCA type "link". This allows
additional parameters or anchors in the shortcut, e.g. to redirect
directly to a content element.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 14

Review log 5172

Show 3347 earlier messages
  1. Guido Schmechel uploaded patch set 1 02/04/23, 18:26

  2. core-ci voted on patch set 1 V +1 02/04/23, 18:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37058

  3. Guido Schmechel commented on patch set 1 CR -1 02/04/23, 19:03

    From a UI point of view, it is better if we use the TCA type link. To clarify: Possibly a breaking change because the field int becomes string?
  4. Benni Mack commented on patch set 1 02/04/23, 19:33

    how about we migrate the shortcut field itself to type=link?
  5. Guido Schmechel commented on patch set 1 02/04/23, 19:42

    Reply

    That's exactly what I'm changing :-) The other was rather uncool from Editor's point of view.
  6. Benni Mack commented on patch set 1 02/04/23, 20:04

    Reply

    ha, OK. did not see your latest comment there yet. thanks!
  7. Stefan Bürk commented on patch set 1 02/04/23, 20:24

    Reply

    Maybe I'm not fully seeing the use-case. But if the field itself is switched to "type=link" as Benni mentioned - wouldn't that adding two additional columns (shortcut_parameters & shortcut_fragment) not obsolete/superflous ? Additional arguments (parameters) can be added/entered in the page-linkbrowser shown by the field type link, also content elements are selectable creating fragment based on the content element uid oO
  8. Stefan Bürk commented on patch set 1 02/04/23, 20:33

    Reply

    switching to type=link, we should add aupdate wizard replacing "0" with "" in that field and eventually to t3 syntax, "also" not needed as integer is taken as pure page.
  9. Guido Schmechel uploaded patch set 2 CR -1 V +1 02/04/23, 20:56

  10. Guido Schmechel uploaded patch set 3 02/04/23, 20:58

  11. core-ci voted on patch set 3 V -1 02/04/23, 21:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37070

  12. core-ci voted on patch set 2 V -1 02/04/23, 21:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37069

  13. Guido Schmechel uploaded patch set 4 V -1 02/04/23, 22:36

  14. core-ci voted on patch set 4 V -1 02/04/23, 23:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37082

  15. Guido Schmechel uploaded patch set 5 V -1 02/05/23, 08:21

  16. Guido Schmechel uploaded patch set 6 02/05/23, 09:25

  17. core-ci voted on patch set 5 V -1 02/05/23, 09:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37100

  18. core-ci voted on patch set 6 V -1 02/05/23, 10:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37101

  19. Guido Schmechel uploaded patch set 7 V -1 02/05/23, 11:10

  20. Guido Schmechel uploaded patch set 8 02/05/23, 11:34

  21. core-ci voted on patch set 7 V -1 02/05/23, 11:40 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37103

  22. core-ci voted on patch set 8 V -1 02/05/23, 12:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37104

  23. Guido Schmechel uploaded patch set 9 V -1 02/05/23, 16:28

  24. core-ci voted on patch set 9 V +1 02/05/23, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37119

  25. Georg Ringer commented on patch set 9 02/05/23, 19:41

    PageRepository.php:157

    use typed properties

    ext_tables.sql:78

    can this be a breaking change as previously ext authors have been sure this is an integer?
  26. Stefan Bürk commented on patch set 9 02/05/23, 19:51

    ext_tables.sql:78 Reply

    basically - yes.
  27. Guido Schmechel commented on patch set 9 02/05/23, 21:41

    PageRepository.php:157 Reply

    Should I change the other variables of the class here as well? These are not yet inside as TypedProperty. But this would not be part of the patch.

    ext_tables.sql:78 Reply

    How do we deal with it? Once adding a Breaking RST and then set this feature only for v13 or is v12 still feasible?
  28. Benni Mack commented on patch set 9 02/06/23, 07:59

    glad you added this, I had the beginning of this change in my stash for a few years already :) But never finished it.

    ext_tables.sql:78 Reply

    I think we need an upgrade wizard, IMHO this should not justify a Breaking change.
  29. Chris Müller uploaded patch set 10 V +1 02/08/23, 17:45

  30. core-ci voted on patch set 10 V +1 02/08/23, 18:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37396

  31. Guido Schmechel uploaded patch set 11 V +1 02/11/23, 11:53

  32. core-ci voted on patch set 11 V +1 02/11/23, 12:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37605

  33. Guido Schmechel commented on patch set 11 02/11/23, 12:07

    Reply

    Upgrade Wizard is now available.

    PageRepository.php:157 Reply

    Done, but only for the two new variables.
  34. Andreas Kienast commented on patch set 11 02/15/23, 11:14

    PageLayoutController.php:344

    Since `$shortcutData` is only used in this `case`, I'd opt to move the call to `resolveShortcutLinkParts()` here. What do you think?
  35. Oli Bartsch commented on patch set 11 02/15/23, 13:04

    Feature-17406-AdditionalParametersForShortcuts.rst:14

    Please mention that we are talking about the pages' shortcut field.

    ShortcutFieldMigration.php:61

    Could we use getPreparedQueryBuilder() instead?
  36. Guido Schmechel uploaded patch set 12 V +1 02/15/23, 20:50

  37. core-ci voted on patch set 12 V +1 02/15/23, 20:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37780

  38. Guido Schmechel commented on patch set 12 02/15/23, 21:57

    PageLayoutController.php:344 Reply

    You are right. In the other cases, this is not needed after all.

    Feature-17406-AdditionalParametersForShortcuts.rst:14 Reply

    The various text passages have been adjusted and made equal.

    ShortcutFieldMigration.php:61 Reply

    Yes, has been changed.
  39. Benni Mack commented on patch set 12 03/20/23, 15:26

    PageLinkBuilder.php:377

    so this would mean we would override existing fragments?
  40. Guido Schmechel commented on patch set 12 03/20/23, 20:21

    PageLinkBuilder.php:377 Reply

    That is the question of what has more priority? - Page A, Page B and Page C are created. - I am on page A and have a link to page B, which is linked to content 123. - Status: Page A shows the link to page B with fragment 123 - Editor now decides to create page B as a shortcut to page C, but wants to jump to Content 456. - Status now: Page A now shows the shortcut to page C with fragment 456.
  41. Benni Mack commented on patch set 12 03/22/23, 19:26

    PageLinkBuilder.php:377 Reply

    Usually when coming from typolink.section = #abcdef this should have priority (in my opinion), imagine you link to a content element within a different page? Anyway, I'll leave that up to you, the most important thing is that you a) document the behaviour you expect and b) we have tests for that behavior.
  42. Guido Schmechel commented on patch set 12 CR -1 03/23/23, 09:14

    PageLinkBuilder.php:377 Reply

    Okay I understand your point better now. You are assuming that someone is already linking to the shortcut and then wants to dynamically change the section. I would still prioritize here on the field in the shortcut to have only one single point of truth. Otherwise you can also link directly to the target page and not to the shortcut, if you want to control it differently. I'll take care of it.
  43. Guido Schmechel uploaded patch set 13 CR -1 V +1 03/24/23, 20:52

  44. core-ci voted on patch set 13 V -1 03/24/23, 21:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39600

  45. Guido Schmechel uploaded patch set 14 V -1 03/24/23, 21:59

  46. core-ci voted on patch set 14 V -1 03/24/23, 22:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39611

  47. Stefan Bürk rebased onto patch set 15 V -1 03/25/23, 11:47

  1. core-ci voted on patch set 15 V +1 03/25/23, 11:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39627

  2. Guido Schmechel commented on patch set 15 03/25/23, 12:00

    PageLinkBuilder.php:377 Reply

    Done. Tests and an example in the documentation have been added.
  3. Andreas Kienast commented on patch set 15 03/27/23, 08:32

    PageRepository.php:2231

    IMO this method doesn't belong into a repository

    TypoScriptFrontendController.php:1856

    I do not fully understand why we need this, hiding behind a flag looks fishy to me. Could you please elaborate?

    TypoLinkGeneratorTest.php:637

    public static with phpunit v10.
  4. Guido Schmechel commented on patch set 15 03/27/23, 10:21

    PageRepository.php:2231 Reply Unresolved

    Yeah, Benni didn't think that was so cool either. I'm a little lacking in creativity as to where the whole thing belongs, because ultimately two services are used again. Do you have any idea what might be more appropriate? Alternatively, we add a new service with a public method? We use the function in the PageLayoutController, too.

    TypoScriptFrontendController.php:1856 Reply

    This function is used twice. Once the mountpoint is in play and this must continue to use $this->page. Therefore the distinction with a boolean to be able to control this.

    TypoLinkGeneratorTest.php:637 Reply

    Ack
  5. Guido Schmechel uploaded patch set 16 V +1 03/27/23, 14:04

  6. core-ci voted on patch set 16 V +1 03/27/23, 14:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39702

  7. Benni Mack commented on patch set 16 CR -1 03/27/23, 19:56

    as much as I would love to have this feature in, I think we have a further issue with this patch. Recursive shortcuts don't get resolved as getShortcutPage() needs the adaption... it cannot handle the value when calling itself.
  8. Guido Schmechel commented on patch set 16 03/27/23, 20:24

    Reply

    I see. Let's rather integrate stable features. It will not be the last TYPO3 version ;-)
  9. Lina Wolf commented on patch set 16 07/04/23, 16:24

    I talked about this use case with Anja a while ago. It seems to be a good idea to introduce a new page type with the typolink shortcut, which also uses a new field in the pages table. We can then deprecate the existing page types shortcut and external reference and have a smooth migration.
  10. Jan Kornblum commented on patch set 16 07/16/24, 11:12

    Reply

    I like the idea with the new page type, it would also solve #102129, and as Lina says, offers a nice migration path.
  11. Benni Mack commented on patch set 16 01/08/25, 16:37

  12. Benni Mack marked it work in progress 03/28/25, 13:30

  13. Benni Mack uploaded patch set 17 CR -1 V +1 09/23/25, 08:20

  14. Benni Mack uploaded patch set 18 09/23/25, 08:21

  15. core-ci voted on patch set 17 V -1 09/23/25, 08:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85371

  16. core-ci voted on patch set 18 V -1 09/23/25, 08:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85372

  17. Lina Wolf commented on patch set 18 10/27/25, 10:15

    Starting work on this
  18. Lina Wolf uploaded patch set 19 V -1 10/27/25, 13:01

  19. core-ci voted on patch set 19 V -1 10/27/25, 13:13 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87655

  20. Lina Wolf uploaded patch set 20 V -1 10/27/25, 14:22

  21. core-ci voted on patch set 20 V +1 10/27/25, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87665

  22. Lina Wolf commented on patch set 20 10/27/25, 14:32

    TypoScriptFrontendController.php:1856 Reply

    Done
  23. Lina Wolf uploaded patch set 21 V +1 10/27/25, 15:30

  24. core-ci voted on patch set 21 V -1 10/27/25, 15:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87671

  25. Benni Mack abandoned the change 12/09/25, 09:40

    Abandoning this change, thanks Guido for this work, the feature got moved into Core 14 in a different way now.