Review main Merged

91402[FEATURE] Search translated pages in page tree filter

Oli Bartsch CR +2 V +2 Expert +1352 −23 updated 12/05/25, 13:04

Commit message

The page tree filter now supports searching for pages
through their translated content, making it significantly
easier to find pages in multilingual TYPO3 installations.

Two new search methods are available:

1. Search by translated page title: When a search phrase
   matches a translated page title or nav_title, the
   corresponding default language page is found and
   displayed in the page tree.

2. Search by translation UID: When searching for a
   numeric page UID that belongs to a translated page,
   the parent default language page is found and displayed.

Visual feedback is provided through colored labels:

- "Search result" label for direct matches
- "Found in translation: [Language]" for single translation matches
- "Found in multiple translations" for multiple translation matches

The feature is enabled by default and can be controlled via:

- User TSconfig: options.pageTree.searchInTranslatedPages
- User preference: Toggle in page tree toolbar menu

The feature respects user permissions (language restrictions) and
workspace context.

For performance reasons, it is activated only if the search
yields fewer than 100 results, and it requires the user to
enter at least two characters or a number.

Additionally, this patch fixes a pre-existing bug in
PageTreeRepository that was exposed by the translation
search feature. The bug occurred when using non-numeric
search phrases in workspaces with PostgreSQL.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Garvin Hicking +1
    • Josua Vogel +1
    • Sven Liebert +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Garvin Hicking +1
    • Josua Vogel +1
    • Sven Liebert +1
    • core-ci +1 CI

Issues 1

Files 21

Show 1 more file

Review log 2430

Show 35 earlier messages
  1. Oli Bartsch uploaded patch set 1 11/02/25, 09:49

  2. core-ci voted on patch set 1 V -1 11/02/25, 09:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88318

  3. Oli Bartsch uploaded patch set 2 V -1 11/02/25, 10:04

  4. core-ci voted on patch set 2 V +1 11/02/25, 10:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88319

  5. Lina Wolf commented on patch set 2 11/05/25, 12:47

    I found the old layout from the previous patch easier to understand without description, also it had the advantage to be understandable without applying meaning to color (which is not accessible)
  1. Lina Wolf commented on patch set 2 11/05/25, 12:48

    The highlighting of the found string inside of the page tree is now missing. Therefore it is harder to quickly detect where in the title the word was found
  2. Oli Bartsch uploaded patch set 3 V +1 11/26/25, 06:36

  3. Oli Bartsch commented on patch set 2 11/26/25, 06:37

    Reply

    why is this relevant? This even does not work if you use a nac title and search for the title (in default) and does obviously also not work for localizations. So there is a single use case when this would work at all => search for title and only title is set for a page.

    Reply

    Previous patch also used color, which is not accessible in the current implementation as well. This patch even improves this by adding the information to the label that a node was found and in which language.
  4. core-ci voted on patch set 3 V +1 11/26/25, 06:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90999

  5. Garvin Hicking commented on patch set 3 11/26/25, 07:12

    Feature-107961-SearchTranslatedPagesInPageTree.rst

    This file needs to be moved to 14.1
  6. Oli Bartsch uploaded patch set 4 V +1 11/26/25, 07:18

  7. Oli Bartsch commented on patch set 4 11/26/25, 07:19

    Feature-107961-SearchTranslatedPagesInPageTree.rst Reply

    Done
  8. core-ci voted on patch set 4 V +1 11/26/25, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91003

  9. Oli Bartsch commented on patch set 4 11/26/25, 07:30

    Reply

    And to give more context, I've removed this based on feedback, which showed that the regex on every node item already has quite performance implications. Those are also resolved with this patch.
  10. Garvin Hicking commented on patch set 4 11/27/25, 09:20

    Reply

    As discussed privately: I also would not want to live without the highlighting feature here. It is applied only to the nodes found in a search result, and the impact should not really be that much. If you have that many results that the regexps matter, you have other browser UI performance problems already. In that case I would only remove regexp highlighting for let's say 100+ results. We could also remove the highlighting when only 1 character is entered for the search? 2 characters would also have a benefit when for example search for product codes and having 2 numbers.
    Very nice. Once the string highlight is back I would like to have this! :)

    PageTreeRepository.php:551

    I understand the "else" part receiving secure gating, but here for a constant "0" I think we can prevent named parameters for some micro optimization

    Feature-107961-SearchTranslatedPagesInPageTree.rst:83

    While I can understand the reasoning and I would be okay with it, it feels a bit too "christmas-tree-y" to me with that many labels. Personally I would be fine with only having "orange" as a label indicating a match for a translation ONLY. The results that contain the searchword in only the "original" and in original AND translation could just have no coloured label. (My subjective opinion)

    Feature-107961-SearchTranslatedPagesInPageTree.rst:85

    ```suggestion Flexibility for developers ```
  11. Oli Bartsch uploaded patch set 5 V +1 12/03/25, 10:39

  12. core-ci voted on patch set 5 V -1 12/03/25, 10:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91514

  13. Oli Bartsch uploaded patch set 6 V -1 12/03/25, 11:01

  14. core-ci voted on patch set 6 V +1 12/03/25, 11:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/91515

  15. Oli Bartsch commented on patch set 6 12/03/25, 11:21

    Reply

    Done

    PageTreeRepository.php:551 Reply

    Done

    Feature-107961-SearchTranslatedPagesInPageTree.rst:83 Reply

    We now only use one color.

    Feature-107961-SearchTranslatedPagesInPageTree.rst:85 Reply

    Done
  16. Josua Vogel commented on patch set 6 12/04/25, 10:54

    tree.ts:1129

    Is it an existing performance problem, or is it caused by this change?

    PageTreeFilter.php:214

    I am undecided as to whether “Search result” should always appear on the label/title. Ultimately, this item represents a search result, even if it refers to the translations hidden “behind” it.

    Feature-107961-SearchTranslatedPagesInPageTree.rst:22

    maybe we should mention the backend name, e.g. ```suggestion title or "Alternative Navigation Title" (nav_title), the corresponding default language page will be found and ```
  17. Jochen Roth voted on patch set 6 CR +1 V +1 12/04/25, 13:10

  18. Sven Liebert voted on patch set 6 CR +1 V +1 12/04/25, 15:13

  19. Oli Bartsch commented on patch set 6 12/04/25, 22:23

    tree.ts:1129 Reply

    According to @benjamin.kott@outlook.com it is an existing problem. Thats why I removed this feature initially but added it again with those "limitations". (see comments by Garvin)

    PageTreeFilter.php:214 Reply

    For me this would duplicate the information and would hinder the distinction between direct match and translated page.

    Feature-107961-SearchTranslatedPagesInPageTree.rst:22 Reply

    I would like to keep it, because this is a technical description of the fields, being considered for filtering. Such changelog is usually not meant as an editor guide. Such information would be placed in the official docs instead.
  20. Oli Bartsch commented on patch set 6 12/04/25, 22:24

    Reply

    Done
  21. Josua Vogel voted on patch set 6 CR +1 V +1 12/05/25, 05:58

  22. Garvin Hicking commented on patch set 6 12/05/25, 10:13

    reviewing
  23. Garvin Hicking commented on patch set 6 CR +1 V +1 12/05/25, 11:56

    Very helpful, and motivates me to finish the "search by frontend URI" patch. Thanks!

    Reply

    Done
  24. Oli Bartsch voted on patch set 6 CR +2 V +2 12/05/25, 13:04

  25. Oli Bartsch merged patch set 7 12/05/25, 13:04