Review main Abandoned

90642[FEATURE] License selector in file metadata

Mathias Bolt Lesniak CR -1 V 0 Normal +159 −6 updated 10/22/25, 15:58

Commit message

Adds a license selector menu to a file's metadata record as a part of
the EXT:filemetadata core extension. Licenses are picked from a new file
license record.

This is especially advantageous for images, where licensing types, not
just copyright information can affect how the asset can be used on a
website.

A defined set of licenses also makes it easier to track license usage
within a TYPO3 instance.

Review

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

Issues 1

Files 5

Review log 1719

  1. Mathias Bolt Lesniak uploaded patch set 1 09/09/25, 13:52

  2. Mathias Bolt Lesniak marked it work in progress 09/09/25, 13:58

  3. core-ci voted on patch set 1 V +1 09/09/25, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84709

  4. Garvin Hicking commented on patch set 1 09/09/25, 19:35

    Feature-107415-LicenseSelectorInFileMetadata.rst:34

    Are you considering adding a "LicenseProvider" maybe (on top of custom DB records)? And maybe ship the set od some CC licenses? maybe there's even an api or so we ould use to keep those license updated similar to the country API? Keeping them in sync with updates or allowing to edit license is a conceptual problem of course. Maybe an admin backend that allows to simply import the latest set or so?

    ext_tables.sql:12

    theoretically the SQL autogeneration by TCA should cover all these fields?
  5. Mathias Bolt Lesniak commented on patch set 1 09/10/25, 07:12

    Feature-107415-LicenseSelectorInFileMetadata.rst:34 Reply Unresolved

    I wasn't considering a LicenseProvider, but it's a nice idea. I would suggest keeping this patch an MVP and introducing it in a separate patch. As for providing predefined licenses, I think that will be difficult. I assume most sites will work with a subset of licenses, some of which may be CC, but may also be supplier-specific (like Unsplash) or internal licenses.

    ext_tables.sql:12 Reply

    Theory seems to be implemented in practice, so we're good here. All DB fields are created.
  6. Georg Ringer commented on patch set 1 09/10/25, 13:15

    ext_tables.sql:12 Reply

    I don't like just another table for that, why not using static select items?
  7. Mathias Bolt Lesniak commented on patch set 1 09/10/25, 13:43

    ext_tables.sql:12 Reply

    I considered putting it into configuration, but files, like pages, are in the editor domain and should be editable by them. Compare it to a category: I don't think editors should need to contact their agency to change them. PS! That's also why there's an "addRecord" field control in there. Though it doesn't seem to work for selectSingle (unless I've done something wrong).
  8. Mathias Bolt Lesniak uploaded patch set 2 V +1 09/11/25, 19:47

  9. Mathias Bolt Lesniak commented on patch set 2 09/11/25, 19:54

    ext_tables.sql:12 Reply Unresolved

    FYI: Patchset 2 removes the "addRecord" field control and sets `'rootLevel' => -1,`.
  10. Mathias Bolt Lesniak marked it ready for review 09/11/25, 19:54

  11. core-ci voted on patch set 2 V +1 09/11/25, 19:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84862

  12. Benni Mack commented on patch set 2 CR -1 10/01/25, 13:58

    While I am fine adding this field, I personally disagree with the proposal. Why should we have a (typically) fixed list of licenses for one system (translateable?) and start with an empty list? Looking into the history of TYPO3, using an approach like static_info_tables would be feasable, however, we instead decided to use a fixed list for languages and countries as they typically don't change _that_ much. I'm much more in favor of a) a static text DB content where "GPL2+" is written into the DB instead of "1" (= relation to sys_file_license) b) A selectSingle or text w/ valuePicker using the following defaults from choose a license (we could even group them like described on the page) and then continue to add up more licenses as we go along: - https://choosealicense.com/non-software/ - https://choosealicense.com/licenses/ People can extend it via TCA itemsProcFunc or just the items list directly + plus we'd have grouping right away. Now, from a developer perspective, I'd love to avoid another JOIN on yet another DB table "just for the string of a license".
  13. Mathias Bolt Lesniak commented on patch set 2 10/01/25, 14:34

    Reply

    These are valid arguments from a developer perspective, but as I've answered to similar arguments already, licenses live in user space. 😊 Unlike countries, there is no immutable list to choose from. When purchasing images commercially, custom licenses are the rule, not the exception. It would also be an extra burden on the customer if they always have to pay their agency to make code-level changes each time a license changes. (For example, there can be a difference between the license for stock photos bought from photo agency X in 2022 and 2025. The ability to track these licenses can be important too.)
  14. Benni Mack commented on patch set 2 10/01/25, 15:04

    Reply

    Yes. But next to the developer perspective: From a UX PoV having "no license" by default - might be odd. Next up is: How do I get this information via Fluid / TypoScript / PHP when using FAL?
  15. Oli Bartsch commented on patch set 2 10/01/25, 15:12

    Reply

    I understand the general need for such information, but I agree with Benni here. In my opinion, it doesn’t make sense to ship a field with a JOIN relation to an empty table that has to be manually filled on every installation. A static list seems the better choice. If there’s real demand for editor-side modifications of that list, this could be provided by an extension, but we should avoid introducing another table into the core.
  16. Mathias Bolt Lesniak commented on patch set 2 10/01/25, 15:21

    Reply

    Looking at the use case, if the information is not user editable, it won't make much sense. Then I would say the entire feature should be in an extension and this patch should be marked as abandoned. 😊
  17. Benni Mack commented on patch set 2 10/01/25, 15:34

    Reply

    I think a dynamic valuePicker approach would be the best then. a) the text is in the DB field (not a relation) b) editors can populate the valuePicker values via GUI. Aaaaand ideally, we have a couple of pre-filled licenses shipped.
  18. Mathias Bolt Lesniak commented on patch set 2 10/01/25, 16:02

    Reply Unresolved

    I think you're missing something here (this is more than a static value), but let's have a chat about it on Monday or Tuesday. Maybe we're just talking past each other.
  19. Benni Mack abandoned the change 10/22/25, 15:58

    won't do for now - discussed with MBL