Review main Merged

91236[FEATURE] Provide content statistics report

Georg Ringer CR +2 V +2 Hard +681 −0 updated 03/11/26, 08:38

Commit message

Introduces a new "Content statistics" module in the Reports section,
providing insights into content element types, their usage counts,
and related field configurations.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • Anja Leichsenring +1
    • Benni Mack +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oli Bartsch +1
    • Garvin Hicking +1
    • Anja Leichsenring +1
    • Benni Mack +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 7096

Show 4971 earlier messages
  1. Georg Ringer uploaded patch set 1 10/24/25, 07:08

  2. core-ci voted on patch set 1 V -1 10/24/25, 07:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87471

  3. Georg Ringer uploaded patch set 2 V -1 10/27/25, 13:40

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

  5. Georg Ringer uploaded patch set 3 V -1 10/27/25, 17:21

  6. core-ci voted on patch set 3 V -1 10/27/25, 17:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87693

  7. Georg Ringer uploaded patch set 4 V -1 10/29/25, 18:05

  8. core-ci voted on patch set 4 V -1 10/29/25, 18:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88026

  9. Garvin Hicking commented on patch set 4 10/29/25, 21:37

    I love what this does to allow "judging" setups and introspect them to do auditing or analysis of complexity. I do think the current UI is a bit overwhelming, and probably sorting capabilities would help, or some kind of "tabbing" to differentiate between the output. Maybe a CLI command for this (JSON output?) would also be helpful, especially if the evaluation takes some longer time? The collapsing and toggling already helps a lot. I think having the icon bars repeat the icon of a CType is more confusing than it helps, I think a plain number indicator would suit better. Minor things: We should directly use the new domain translation keys here, and use the ComponentFactory for the Button API. I would love for this to go forward.
  10. Georg Ringer uploaded patch set 5 V -1 10/30/25, 05:41

  11. core-ci voted on patch set 5 V -1 10/30/25, 05:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88078

  12. Georg Ringer uploaded patch set 6 V -1 10/30/25, 14:35

  13. core-ci voted on patch set 6 V -1 10/30/25, 14:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88155

  14. Georg Ringer uploaded patch set 7 V -1 10/30/25, 16:06

  15. core-ci voted on patch set 7 V -1 10/30/25, 16:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88166

  16. Josef Glatz commented on patch set 7 10/30/25, 16:31

    ContentStatisticsController.php:60

    Would love to have the possibility to copy a direct url to the record detail view of a CType.

    locallang.xlf:61

    Should we also mention TCA changes based on FormDataProviders?

    ContentStatistics.html:54

    Is it possible to make the CType value selectable (copyable to clipbord)?
  17. Josef Glatz commented on patch set 7 10/30/25, 18:23

    ### Ordering of CTypes I like the ordering (often used → fewer used) ### UI - a detail view is crucial. especially when you want to share a detail view url to a colleague for example - as already discussed in private chat: i found no existing component to improve the UI. Improvements can always be made later. I think the primary goal is to have such an overview in the core builtin to gain a general understanding of which CTypes are used.
  18. Georg Ringer uploaded patch set 8 V -1 10/30/25, 19:41

  19. core-ci voted on patch set 8 V +1 10/30/25, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88185

  20. Josef Glatz uploaded patch set 9 V +1 10/30/25, 19:58

  21. core-ci voted on patch set 9 V -1 10/30/25, 20:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88186

  22. Josef Glatz uploaded patch set 10 V -1 10/30/25, 20:10

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

  24. Josef Glatz uploaded patch set 11 V +1 10/30/25, 20:20

  25. Josef Glatz commented on patch set 11 10/30/25, 20:22

    ContentStatisticsController.php:60 Reply

    Done in patchset 11

    locallang.xlf:61 Reply

    discussed > we keep possibilities to a minimum in this info

    ContentStatistics.html:54 Reply

    Acknowledged > we can double click and copy it to clipboard in detailview
  26. Georg Ringer uploaded patch set 12 10/30/25, 20:24

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

  28. core-ci voted on patch set 12 V +1 10/30/25, 20:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88192

  29. Georg Ringer uploaded patch set 13 V +1 10/30/25, 20:36

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

  31. Georg Ringer commented on patch set 13 10/30/25, 21:00

    This change is ready for review.
  32. Garvin Hicking commented on patch set 13 10/30/25, 21:45

    This is shaping up pretty nice. I think it is useful!

    ContentStatisticsService.php:91

    Methods can be private for the final class, and I believe should be called plural "statistics"

    ContentStatisticsService.php:169

    inject connectionpool

    ContentStatistics.html:10

    could use shorthand domain keys here?

    ContentStatisticsDetail.html:171

    missing l10n key
  33. Oli Bartsch commented on patch set 13 10/30/25, 21:48

    Like the idea. Did a short read through but have to test in more detail.

    ContentStatisticsService.php:33

    I think this is not necessary because this service is not called via ::makeInstance

    ContentStatisticsService.php:72

    This might lead to ``` TYPO3\CMS\Core\Schema\Exception\UndefinedSchemaException ```

    ContentStatisticsService.php:140

    This does not respect workspaces

    ContentStatisticsService.php:144

    Should be injected
  34. Georg Ringer commented on patch set 13 10/31/25, 05:54

    ContentStatisticsService.php:33 Reply

    did it just as in RecordStatisticService

    ContentStatisticsService.php:72 Reply

    how likely is that with tt_content?

    ContentStatisticsService.php:91 Reply

    but it is called in the controller?

    ContentStatisticsService.php:140 Reply

    was by intend, but will change it

    ContentStatisticsService.php:144 Reply

    on it

    ContentStatisticsService.php:169 Reply

    Done
  35. Georg Ringer uploaded patch set 14 V +1 10/31/25, 05:54

  36. Georg Ringer commented on patch set 14 10/31/25, 05:55

    ContentStatisticsService.php:148

    didn't add the workspacerestriction, IMO it is better that way, to really avoid having false positives?
  37. core-ci voted on patch set 14 V +1 10/31/25, 06:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88227

  38. Garvin Hicking commented on patch set 14 10/31/25, 06:26

    ContentStatisticsService.php:91 Reply

    marked the wrong line I meant the protected ones ofc ;)
  39. Garvin Hicking commented on patch set 14 10/31/25, 06:27

    ContentStatisticsService.php:148 Reply

    how about a toggle/checkbox like "[x] only evaluate published records" and only show it when workspaces are active?
  40. Stefan Froemken commented on patch set 15 V +1 10/31/25, 07:15

    Published edit on patch set 14.
  41. core-ci voted on patch set 15 V +1 10/31/25, 07:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88230

  42. Stefan Froemken commented on patch set 15 10/31/25, 07:58

    ContentStatisticsService.php:33 Reply

    I was not needed in RecordStatisticService, too. I also prefer to remove the "public: true"
  43. Oli Bartsch commented on patch set 15 10/31/25, 08:02

    ContentStatisticsService.php:72 Reply

    I actually encountered this. Otherwise I might have missed it.

    ContentStatisticsService.php:140 Reply

    I think it makes no sense to find workspace records in live workspace.
  44. Georg Ringer commented on patch set 15 10/31/25, 08:18

    ContentStatisticsService.php:140 Reply

    I don't agree: if there is a new content element provided and editors start to use those in their workspace, the content element is already in use and that should be shown and not as unused. There can also be the other way that there is just outdated content in a workspace which might have even been removed. but maybe this encourages the maintainer to clean up better. Yes of course, there are editors who only hide stuff and never delete content (fear of needing it, no recycler available, seasonal content...) and also content of deleted parent pages is shown as enabled but this is a different story (dbdoctor)
  45. Garvin Hicking commented on patch set 15 10/31/25, 08:29

    ContentStatisticsService.php:140 Reply

    I think for statistics it might be good to know that a planned workspace change is about to use an element that is not yet used "live". Otherwise one might think, an element is unused, but it is not. Having workspace records evaluated somehow is IMO important.
  46. Stefan Froemken commented on patch set 15 10/31/25, 08:39

    ContentStatisticsController.php:69

    Not in every TYPO3 system the first root page is "1". IMO page is and should be a required parameter. If not given show a warning.

    ContentStatisticsService.php:42

    Nice to have. Implement them as "const"

    ContentStatisticsService.php:62

    Please move them to front. In core we do not have "||" at the end of a condition line.

    ContentStatisticsService.php:104

    We have an ArrayPaginator in Core. Isn't is usabe here?

    ContentStatisticsService.php:189

    Just a nice-to-have (upper-case): COUNT(CType) although: the column is not nullable, so COUNT(*) would fit better.

    ContentStatisticsService.php:189

    ```suggestion ->addSelectLiteral('COUNT(*) as count') ```

    ContentStatisticsService.php:215

    ```suggestion $counts[$ctype][$key] += $count; ```

    ContentStatisticsDetail.html:119

    Typo? ```suggestion <f:variable name="goToPageUrl"> ```

    ContentStatisticsDetail.html:130

    ```suggestion data-url="{goToPageUrl}" /> ```

    ContentStatisticsDetail.html:154

    This is exactly the same than above. Do we need that?

    ContentStatisticsDetail.html:162

    nitpicking: In most cases you do not add any space between argument and value, but here you have added one, which is my personnel favorit. Please streamline them.
  47. Georg Ringer uploaded patch set 16 V +1 10/31/25, 08:59

  48. Georg Ringer commented on patch set 16 10/31/25, 08:59

    ContentStatisticsController.php:69 Reply

    this is just the pagination

    ContentStatisticsService.php:148 Reply

    IMO no. there might be a lot of elements which are marked as active but are not reachable - not even for an admin. imagine broken rootline, translated elements but the languag has been removed, inline relations to tt_content elements and parent removed ...

    ContentStatistics.html:10 Reply

    Done
  49. Georg Ringer commented on patch set 16 10/31/25, 09:02

    ContentStatisticsService.php:42 Reply

    Acknowledged

    ContentStatisticsService.php:91 Reply

    Done

    ContentStatisticsService.php:148 Reply

    Done

    ContentStatisticsService.php:189 Reply

    Done

    ContentStatisticsService.php:189 Reply

    Done

    ContentStatisticsService.php:215 Reply

    Done

    ContentStatisticsDetail.html:119 Reply

    Done

    ContentStatisticsDetail.html:130 Reply

    Done

    ContentStatisticsDetail.html:154 Reply

    yes IMHO we do

    ContentStatisticsDetail.html:162 Reply

    Done

    ContentStatisticsDetail.html:171 Reply

    Done
  50. core-ci voted on patch set 16 V +1 10/31/25, 09:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88234

  51. Stefan Froemken commented on patch set 16 10/31/25, 09:31

    ContentStatisticsService.php:108

    I would use empty() only, if I don't know the data type ```suggestion if ($ctype === '') { ```
  52. Stefan Froemken commented on patch set 16 V -1 10/31/25, 09:36

    Entries of table "Pages" does not have a column header as all the other tables. I prefer using "Title"
  53. Stefan Froemken commented on patch set 16 V 0 10/31/25, 09:41

    Sorry. Content Statistics...and not Record Statistics. My fault
  54. Stefan Froemken commented on patch set 16 10/31/25, 09:50

    locallang.xlf:67

    What do you want to achieve with this list? Seems you want to inform integrators to remove elements for the editors, as these elements are not in use.
  55. Georg Ringer commented on patch set 16 10/31/25, 10:56

    locallang.xlf:67 Reply

    Multiple use cases: if you want to calculate an upgrade, this can be an entry point to look at, or maybe your you can discuss with the client that some elements can be removed or maybe should be used but permissions are missing Or you try to migrate away from html element and you see how many records are still using it and once all are deleted you can finally adopt the permissions
  56. Simon Schaufelberger commented on patch set 16 11/01/25, 18:05

    ContentStatisticsController.php:38

    since the class is final, the Classes can be private

    ContentStatisticsController.php:86

    private
  57. Georg Ringer uploaded patch set 17 V +1 11/03/25, 20:52

  58. Georg Ringer commented on patch set 17 11/03/25, 20:52

    ContentStatisticsController.php:38 Reply

    Done

    ContentStatisticsController.php:86 Reply

    Done
  59. core-ci voted on patch set 17 V -1 11/03/25, 20:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88418

  60. Georg Ringer commented on patch set 18 V -1 11/03/25, 21:28

    Published edit on patch set 17.
  61. core-ci voted on patch set 18 V +1 11/03/25, 21:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88419

  62. Simon Schaufelberger uploaded patch set 19 V +1 01/17/26, 15:13

  63. Simon Schaufelberger commented on patch set 19 01/17/26, 15:15

    ContentStatisticsService.php:108 Reply

    Done
  64. core-ci voted on patch set 19 V +1 01/17/26, 15:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/93682

  65. Georg Ringer uploaded patch set 20 V +1 01/23/26, 20:00

  66. Simon Schaufelberger commented on patch set 20 01/23/26, 20:03

    ContentStatisticsService.php:128

    would it be possible to use the Pagination API here from the core?
  67. core-ci voted on patch set 20 V +1 01/23/26, 20:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94204

  68. Georg Ringer rebased onto patch set 21 V +1 02/24/26, 12:07

  69. Georg Ringer uploaded patch set 22 02/24/26, 12:12

  70. core-ci voted on patch set 22 V -1 02/24/26, 12:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96724

  71. core-ci voted on patch set 22 V +1 02/24/26, 19:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96724

  1. Stefan Froemken commented on patch set 22 02/24/26, 20:35

    ContentStatisticsService.php:33 Reply

    Done

    ContentStatisticsService.php:62 Reply

    Done

    locallang.xlf:67 Reply

    Done
  2. Stefan Froemken commented on patch set 22 02/24/26, 22:23

    ContentStatisticsService.php:104 Reply

    Done

    ContentStatisticsService.php:128 Reply

    Until now, we haven't had a QueryBuilder paginator in the core, so ArrayPagination always retrieves all available records, which might be very inefficient.
  3. Simon Schaufelberger commented on patch set 22 02/24/26, 23:03

    ContentStatisticsService.php:128 Reply

    ArrayPaginator doesn't do anything internal, you feed the items into it and it will do the rest. I'm just thinking if ArrayPaginator could be used here instead of doing everything by hand which ArrayPaginator already does for you.
  4. Garvin Hicking uploaded patch set 23 V +1 03/06/26, 11:55

  5. Garvin Hicking commented on patch set 23 CR +1 V +1 03/06/26, 11:56

    ContentStatisticsService.php:72 Reply

    Added to intercept this case now, even if unlikely.

    ContentStatisticsService.php:128 Reply

    I think we can leave it like that for now, can be part of a follow-up or maybe CTE integration.

    ContentStatisticsService.php:140 Reply

    (I'm resolving this, asked Oli privately if there are hard objections to move forward with this patch, to which he had none)
  6. core-ci voted on patch set 23 V +1 03/06/26, 12:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97491

  7. Georg Ringer uploaded patch set 24 CR +1 V +1 03/06/26, 12:45

  8. Garvin Hicking uploaded patch set 25 03/06/26, 12:59

    Add location hash position jump to result table
  9. Garvin Hicking voted on patch set 25 CR +1 V +1 03/06/26, 13:00

  10. core-ci voted on patch set 24 V +1 03/06/26, 13:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97500

  11. Simon Schaufelberger voted on patch set 25 CR +1 V +1 03/06/26, 13:10

  12. core-ci voted on patch set 25 V +1 03/06/26, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97506

  13. Stefan Froemken commented on patch set 25 03/10/26, 07:49

    If I open details of CE "header" the path looks like that: / Home/ Files/ Can we somehow prevent the first return after "/"?
  14. Stefan Froemken commented on patch set 25 03/10/26, 07:58

    This feature just shows the number of records. There is no grouping by translation like known from list/records module. For me, that's not a problem. The german record may exists on pagebrowser site 2 and the related translation of that record on page 32.
  15. Georg Ringer commented on patch set 25 03/10/26, 08:28

    grouping cant be

    Reply

    grouping can't be done, thinking of multi sites with different sites
  16. Josef Glatz voted on patch set 25 CR +1 V +1 03/10/26, 09:03

  17. Anja Leichsenring uploaded patch set 26 CR +1 V +1 03/10/26, 19:40

  18. Anja Leichsenring voted on patch set 26 CR +1 V +1 03/10/26, 19:45

  19. core-ci voted on patch set 26 V +1 03/10/26, 19:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97715

  20. Simon Schaufelberger voted on patch set 26 CR +1 V +1 03/10/26, 19:51

  21. Garvin Hicking voted on patch set 26 CR +1 V +1 03/10/26, 19:58

  22. Benni Mack voted on patch set 26 CR +1 V +1 03/11/26, 08:24

  23. Oli Bartsch voted on patch set 26 CR +1 V +1 03/11/26, 08:33

  24. Georg Ringer voted on patch set 26 CR +2 V +2 03/11/26, 08:38

  25. Georg Ringer merged patch set 27 03/11/26, 08:38