Review main Abandoned

91324[FEATURE] Search translated pages in page tree filter

Oli Bartsch CR +1 V -1 Hard +707 −21 updated 02/01/26, 11:42

Commit message

The page tree filter now searches through translated page titles
by default. When a search phrase matches a translated page title,
the corresponding default language page (l10n_parent) is found in
the page tree.

This behavior is enabled by default and can be disabled per user
via the User TSconfig option:
options.pageTree.searchInTranslatedPages = 0

Pages found via translation search are marked with a label,
improving discoverability of content across languages. They
also display which translation matched the search term.

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 +1
    • Garvin Hicking +1
    • Guido Schmechel +1
    • Lina Wolf +1
    • Fabien Udriot +1
  • Verified V -1
    • Oli Bartsch -1
    • Garvin Hicking +1
    • Guido Schmechel +1
    • Lina Wolf +1
    • Fabien Udriot +1
    • core-ci +1 CI

Issues 1

Files 13

Review log 3140

Show 1015 earlier messages
  1. Oli Bartsch uploaded patch set 1 10/29/25, 10:30

  2. core-ci voted on patch set 1 V -1 10/29/25, 10:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87936

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

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

  5. Benni Mack commented on patch set 2 10/29/25, 12:16

    PageTreeFilter.php:47

    shouldn't we use a runtime cache here?

    PageTreeFilter.php:108

    I assume we do overlays somewhere else? Otherwise editors won't find the translations that were added in a workspace?

    PageTreeFilter.php:111

    shouldn't we allow more fields like nav_title as well?

    PageTreeFilter.php:205

    I wonder if it makes sense for editors to limit this to specific languages / translations? WDYT?

    FormPagePreviewRenderer.php:73

    how is this connected to the original feature?
  6. Oli Bartsch uploaded patch set 3 V +1 10/29/25, 13:28

  7. core-ci voted on patch set 3 V -1 10/29/25, 13:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87973

  8. Benni Mack commented on patch set 3 V -1 10/29/25, 13:45

    Tests don't run through
  9. Oli Bartsch uploaded patch set 4 V -1 10/29/25, 13:59

  10. Oli Bartsch commented on patch set 4 10/29/25, 14:01

    PageTreeFilter.php:47 Reply

    Done

    PageTreeFilter.php:108 Reply

    Done

    PageTreeFilter.php:111 Reply

    We search for it but don't need to select it

    PageTreeFilter.php:205 Reply

    I have limited the search to allowedLanguages of a user. A specific selection for this property is IMO to much and complicated.

    FormPagePreviewRenderer.php:73 Reply

    Oh I encountered this when developing the original patch. Will move this into a separate fix. Thanks.
  11. core-ci voted on patch set 4 V -1 10/29/25, 14:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87980

  12. Oli Bartsch uploaded patch set 5 V -1 10/29/25, 14:31

  13. core-ci voted on patch set 5 V +1 10/29/25, 14:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87988

  14. Lina Wolf commented on patch set 5 V +1 10/29/25, 20:17

    NICE!!! Tested this with chinese and arabic pages, worked fine! Will be such a relieve to our editors
  15. Lina Wolf commented on patch set 5 10/29/25, 20:21

    Nice work, just some small remarks

    PageTreeFilter.php:208

    If you are introducing new lebels, I would switch to the translation domain short format right away

    locallang.xlf:240

    New language labels should be in snake_case as that it the new standard

    TranslatedPages.csv:3

    I would add test cases with arabic, chinese and Umlaute
  1. Oli Bartsch uploaded patch set 6 V +1 10/29/25, 21:22

  2. Oli Bartsch commented on patch set 6 10/29/25, 21:23

    PageTreeFilter.php:208 Reply

    Please see https://forge.typo3.org/issues/107844. We decided to wait until the new API is finalized. Otherwise we generate a mess of different usages now and make it even harder to migrate them in the future.

    locallang.xlf:240 Reply

    Done

    TranslatedPages.csv:3 Reply

    Done
  3. core-ci voted on patch set 6 V +1 10/29/25, 21:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88053

  4. Benni Mack commented on patch set 6 V +1 10/29/25, 21:50

    works as expected. need to do a code review now.
  5. Benjamin Franzke commented on patch set 6 CR -1 10/30/25, 00:38

    PageTreeFilter.php:214

    The status information API is here for extensions to provide concrete status information about the page. That status must not be different depending on how the page got into view (via navigation or search). This is not meant to output query information, also this is semantically not a warning. And it becomes overwhelming, I get a title like > id=1766 - styleguide frontend demo3; Translation; Found in translation: styleguide demo language danish: "[Translate to styleguide demo language danish:] styleguide frontend demo", styleguide demo language german: "[Translate to styleguide demo language german:] styleguide frontend demo", styleguide demo language french: "[Translate to styleguide demo language french:] styleguide frontend demo3", styleguide demo language spanish: "[Translate to styleguide demo language spanish:] styleguide frontend demo3" This is a hack that MUST BE avoided, sorry. (The fact, that you need to forcefully overwrite workspace status, actually emphasizes that) My recommendation is to omit this information, simply because we cannot represent it in a sensible way.
  6. Oli Bartsch uploaded patch set 7 CR -1 V +1 10/30/25, 07:58

  7. Oli Bartsch commented on patch set 7 10/30/25, 08:00

    PageTreeFilter.php:214 Reply

    Thanks. That right, status information might confuse here. I have changed this to just add the label. I additionally display a "Found in multiple translations" in case the term matches more than one translation. to not make the label this overwhelming.
  8. core-ci voted on patch set 7 V +1 10/30/25, 08:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88086

  9. Fabien Udriot commented on patch set 5 10/30/25, 08:15

    Nice feature!

    PageTreeFilter.php:87

    Create a method to wrap the logic of cache identifier computing? $this->computeCacheIdentifier()

    PageTreeFilter.php:164

    Method to compute the cache identifier as above.

    PageTreeFilter.php:225

    Hardcoded value?

    PageTreeFilter.php:241

    We could add sorting of languages so to have always the same order, as it will be useful for computing a cache identifier. Just a thought.
  10. Fabien Udriot voted on patch set 7 V +1 10/30/25, 08:23

  11. Oli Bartsch uploaded patch set 8 V +1 10/30/25, 08:37

  12. Oli Bartsch commented on patch set 8 10/30/25, 08:38

    PageTreeFilter.php:87 Reply

    Done

    PageTreeFilter.php:164 Reply

    Done

    PageTreeFilter.php:225 Reply

    Yes this is how the API works. Or do you mean this should be from a class constant?

    PageTreeFilter.php:241 Reply

    Done
  13. core-ci voted on patch set 8 V +1 10/30/25, 08:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88089

  14. Fabien Udriot commented on patch set 8 10/30/25, 08:56

    PageTreeFilter.php:225 Reply

    I mean that it’s not ideal to have colors hardcoded in such way. Can be a class constant or at least a constant `private const LABEL_COLOR = '#F5A770';`
  15. Oli Bartsch uploaded patch set 9 V +1 10/30/25, 09:00

  16. Oli Bartsch commented on patch set 9 10/30/25, 09:00

    PageTreeFilter.php:225 Reply

    Done
  17. core-ci voted on patch set 9 V +1 10/30/25, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88092

  18. Fabien Udriot voted on patch set 9 CR +1 V +1 10/30/25, 09:22

  19. Lina Wolf voted on patch set 9 CR +1 V +1 10/30/25, 11:46

  20. Guido Schmechel commented on patch set 9 CR +1 V -1 10/30/25, 13:49

    Tested as follows: Created two translations (Danish/Norwegian) in live mode. Single and multiple translations were found. Very cool! Defined a term to search for in both translations. PageTree is marked. Everything is fine. In workspace mode, changed these translations so that this term is changed in both languages. The page filter in the navigation now marks the page for the old and new term. Is this intentional?
  21. Oli Bartsch commented on patch set 9 10/30/25, 14:21

    Reply

    yes it is the same like the PageTreeRepository currently works. I did this for consistency reasons. Might be tackler separately for the whole.
  22. Guido Schmechel commented on patch set 9 V +1 10/30/25, 14:47

    Reply

    Thx for clarification!
  23. Garvin Hicking commented on patch set 9 CR +1 V +1 10/31/25, 12:20

    Nifty! :)
  24. Oli Bartsch commented on patch set 9 V -1 11/02/25, 09:50

    Unresolved

    Please review https://review.typo3.org/c/Packages/TYPO3.CMS/+/91402 for an improved approach, based on further feedback.
  25. Oli Bartsch abandoned the change 02/01/26, 11:42