Review main Abandoned

78145[FEATURE] Make records a required field for "Insert Records"

Sybille Peters CR 0 V 0 Easy +36 −0 updated 03/22/23, 19:45

Commit message

Make "Records" (records) a required field for "Insert Records"
(shortcut) CE

As is already the case with other fields, an exclamation mark is
displayed next to the field and if one tries to save with empty
records, an alert pops up.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 1824

  1. Sybille Peters uploaded patch set 1 03/17/23, 08:50

  2. core-ci voted on patch set 1 V +1 03/17/23, 08:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39104

  3. Oliver Klee updated the commit message in patch set 2 V +1 03/17/23, 09:00

  4. core-ci voted on patch set 2 V +1 03/17/23, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39105

  5. Sybille Peters uploaded patch set 3 V +1 03/17/23, 09:10

  6. Sybille Peters updated the commit message in patch set 4 03/17/23, 09:11

  7. core-ci voted on patch set 3 V +1 03/17/23, 09:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39107

  8. core-ci voted on patch set 4 V +1 03/17/23, 09:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39108

  9. Georg Ringer voted on patch set 4 V +1 CR +1 03/17/23, 09:31

  10. Sybille Peters commented on patch set 4 03/17/23, 12:38

    If shortcut_mode != 0, the shortcut is not necessary. So we can't make it a required field in this case. I did not realize this refers to the current page. It would be great to make this field a required field conditionally, but I think that is not possible. So I will remove the pages.php change for now and leave the other one.
  11. Sybille Peters uploaded patch set 5 CR +1 V +1 03/17/23, 12:43

  12. core-ci voted on patch set 5 V +1 03/17/23, 12:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39123

  13. Oliver Klee voted on patch set 5 CR +1 03/17/23, 13:04

  14. Guido Schmechel voted on patch set 5 CR +1 03/18/23, 11:59

  15. Georg Ringer voted on patch set 5 V +1 CR +1 03/19/23, 16:01

  16. Nikita Hovratov uploaded patch set 6 CR +1 V +1 03/22/23, 14:47

  17. Nikita Hovratov voted on patch set 6 V +1 CR +1 03/22/23, 14:48

  18. core-ci voted on patch set 6 V +1 03/22/23, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39389

  19. Christian Kuhn commented on patch set 6 CR -1 03/22/23, 15:10

    I don't agree. It's possible to add a 'insert records' records without referencing records. Just like as its possible to add a 'images only' record without adding images. I don't see the point for restricting editors here: It only forces editors to delete "empty" insert record records, because they're unable to safe them again. If you really need this in your projects workflow for whatever reason, this can be done per-project as TCA override, but I don't see a reason to restrict this by default. Could you maybe elaborate a bit more why you think this is useful and why it should differ from "empty" "images only" CE and similar by default?
  20. Nikita Hovratov commented on patch set 6 03/22/23, 16:17

    Reply

    I think the difference is, that 'insert records' aka shortcut has ONLY this one field. Whereas 'Images Only' also has header, subheader, ... which are rendered in the frontend (with fsc at least). Also, this is such a specific content element with a well-defined usage that I don't think people use it ever for anything else. Why should anyone save it with nothing selected? Of course it should be deleted then, if unused.
  21. Christian Kuhn commented on patch set 6 03/22/23, 16:27

    Reply

    i can't assume on the specific usage within an editing workflow: i could images such a record is used to update on "recent" things, and sometimes there are no recent things, and then this record is 'empty', but should stay to be easily re-usable again if something pops up again. i see no problem with something like that.
  22. Sybille Peters commented on patch set 6 03/22/23, 16:50

    Reply

    I don't see the point of creating an image without images or a shortcut without a target. But, if this is controversial I am fine with abandoning this and doing this in sitepackage. The reason for iniating this patch was that there is a number of these records in our site which are left there for whatever reason which make no sense at all because it is a shortcut record without target. Same goes for shortcut pages / External url pages (doktype 3 and 4) - but for these at least a warning is displayed. While these are not a huge problem, they clutter up the pages along with a number of hidden elements. It is clutter and it does not make it easier for editors. I tend to delete these sort of things because no one else does. Of course on can handle this on site: Override the TCA and delete the already existing ones. But this means everyone has to figure out these kind of things themselves which is sometimes difficult. Can you safely do this? Is there no sideeffect? For example in the case of pages shortcut - it can't be safely done, there the shortcut is only a required field if shortcut_mode = 0. So, this is additional overhead to configure these kind of things.
  23. Sybille Peters abandoned the change 03/22/23, 16:50

    See discussion
  24. Benni Mack commented on patch set 6 03/22/23, 19:45

    Reply Unresolved

    I've seen this problem, where an item was referenced (e.g. a different page), which was deleted later-on and then my content element was empty. This for sure is a problem (talking about managing references to an item), but I guess we'd need a better solution when dealing with deleting items that have strong references to it?