Review main Merged

70767[TASK] Move pid resolving of AddRecord fieldControl into own method

Andreas Kienast CR +2 V +2 Easy +23 −18 updated 09/06/21, 07:05

Commit message

The pid resolving in the `AddRecord` fieldControl is not sufficient in
all cases. To allow easier extension of the pid resolving without the
need to override the whole `render` method, the resolving is extracted
into an own method that can be extended in custom implementations.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Frank Nägler +1
    • Benni Mack +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Frank Nägler +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1517

  1. Andreas Kienast uploaded patch set 1 08/26/21, 08:48

  2. Nikita Hovratov commented on patch set 1 08/26/21, 08:56

    typo implementations
  3. Andreas Kienast commented on patch set 1 08/26/21, 08:56

    Reply

    Ack
  4. Andreas Kienast updated the commit message in patch set 2 08/26/21, 08:56

  5. core-ci voted on patch set 1 V +1 08/26/21, 09:05 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15656

  6. core-ci voted on patch set 2 V +1 08/26/21, 09:18 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15657

  7. Frank Nägler voted on patch set 2 CR +1 08/26/21, 09:27

  8. Benni Mack voted on patch set 2 CR +1 08/30/21, 07:07

  9. Benni Mack voted on patch set 2 V +1 08/30/21, 07:08

  10. Tymoteusz Motylewski commented on patch set 2 09/01/21, 15:07

    Is it guaranteed that the pid is an int always (e.g. no special meaning string like NEW...)?
  11. Andreas Kienast commented on patch set 2 09/01/21, 16:37

    Reply

    IMO you cannot create a record if the *parent* does not exist yet, but I'll check that.
  12. Andreas Kienast commented on patch set 2 09/02/21, 06:12

    Reply

    I've just checked this, FormEngine intercepts here and asks what do to as we're about to leave the current EditDocumentController instance. In any case I was not able to trigger an error, this should be safe.
  13. Frank Nägler voted on patch set 2 V +1 09/02/21, 11:19

  14. Tymoteusz Motylewski commented on patch set 2 09/02/21, 13:28

    Reply

    I was thinking about a scenario when you have a group field on the page, and you create a new page and try to add new record on that not saved page
  15. Andreas Kienast commented on patch set 2 09/03/21, 13:14

    Reply

    That's fine as well, in this case the "foreign" record will be stored in same the pid the page would've been created. However, after saving such a record it's not automatically selected in the group field in case of a new page. This didn't change with the patch.
  16. Andreas Kienast voted on patch set 2 V +2 CR +2 09/04/21, 15:00

  17. Andreas Kienast merged patch set 3 09/06/21, 07:05