Review main Merged

74263[TASK] Log more context for failed DataHandler evaluations

Nikita Hovratov CR +2 V +2 Easy +15 −10 updated 04/14/22, 20:39

Commit message

It can be very hard to debug, which field in
particular has failed, when the DataHandler only
mentions the invalid value without any context.

Therefore, the field name and the table name are now
always added to the log message. This has been done
for the type "link" and type "email" field.

Note: For FlexForm fields the name of the table
column is logged, as it is not feasible to account
for the full path, especially in sections.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • Jörg Bösche +1
    • Susi Moog +1
  • Verified V +2 Done
    • Benni Mack +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1318

  1. Nikita Hovratov uploaded patch set 1 04/09/22, 09:04

  2. core-ci voted on patch set 1 V +1 04/09/22, 09:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25876

  3. Stefan Bürk commented on patch set 1 04/09/22, 09:48

    DataHandler.php:1799

    Hard using the $field is not feasonable. $field may be empty. Should be checked and used conditional wise. (Not sure about table name). From docblock of "checkValue_SW(..)" calling this method: ``` Can be called for FlexForm pseudo fields as well, BUT must not have $field set if so. ```

    DataHandler.php:1998

    Hard using the $field is not feasonable. $field may be empty. Should be checked and used conditional wise. (Not sure about table name). From docblock of "checkValue_SW(..)" calling this method: ``` Can be called for FlexForm pseudo fields as well, BUT must not have $field set if so. ```

    DataHandler.php:1999

    see comment line above

    DataHandler.php:2004

    same here as above
  4. Nikita Hovratov commented on patch set 1 V -1 04/09/22, 11:20

    DataHandler.php:1799 Reply

    Ack
  5. Nikita Hovratov uploaded patch set 2 04/09/22, 12:10

  6. Nikita Hovratov commented on patch set 2 04/09/22, 12:13

    DataHandler.php:1998 Reply

    How about this approach I just pushed: If the field is empty, it is treated as a FlexForm field and the name of the FlexForm field is used instead. Doesn't give us exactly the path inside the flexForm field, but better than nothing.
  7. core-ci voted on patch set 2 V -1 04/09/22, 12:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25879

  8. Nikita Hovratov uploaded patch set 3 04/09/22, 12:32

  9. core-ci voted on patch set 3 V -1 04/09/22, 12:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25881

  10. Nikita Hovratov uploaded patch set 4 04/09/22, 18:30

  11. core-ci voted on patch set 4 V +1 04/09/22, 18:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25884

  12. Nikita Hovratov uploaded patch set 5 04/09/22, 19:44

  13. core-ci voted on patch set 5 V +1 04/09/22, 20:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25886

  14. Stefan Bürk commented on patch set 5 V +1 CR +1 04/09/22, 20:56

    Thanks for taking care of the comments.

    DataHandler.php:1998 Reply

    Done

    DataHandler.php:1999 Reply

    Done

    DataHandler.php:2004 Reply

    Done
  15. Susi Moog voted on patch set 5 CR +1 04/12/22, 16:16

  16. Jörg Bösche voted on patch set 5 CR +1 04/14/22, 09:00

  17. Benni Mack voted on patch set 5 V +2 CR +2 04/14/22, 20:39

  18. Benni Mack merged patch set 6 04/14/22, 20:39