Review main Merged

49261[BUGFIX] Handle l10n_parent if field is no select-type

Markus Klein CR +2 V +2 Easy +20 −4 updated 08/14/16, 18:40

Commit message

The value of l10n_parent is not necessarily an array.
It may as well be a string from a group-type or simple
input.
Adjust the condition for overlay detection accordingly.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Georg Ringer +1
  • Verified V +2
    • Christian Kuhn +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 3746

Show 1621 earlier messages
  1. Markus Klein uploaded patch set 1 07/29/16, 09:31

  2. Markus Klein updated the commit message in patch set 2 07/29/16, 09:38

  3. TYPO3com voted on patch set 1 V +1 07/29/16, 09:44 Completed build in 13m 10s on Fri, 29 Jul, 11:44 AM Test Summary: 19382 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1480

  4. Andreas Kienast commented on patch set 2 07/29/16, 09:47

    SingleFieldContainer.php:70

    would `$parentValue !== ''` work as well?
  5. TYPO3com voted on patch set 2 V +1 07/29/16, 09:48 Completed build in 10m 28s on Fri, 29 Jul, 11:48 AM Test Summary: 19382 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1481

  6. Christian Kuhn uploaded patch set 3 07/29/16, 09:58

  7. Christian Kuhn commented on patch set 2 07/29/16, 09:59

    SingleFieldContainer.php:70 Reply

    Done, Andreas. Additionally, I added comments to both cases and turned the conditions around (the group check is less expensive).
  8. Christian Kuhn voted on patch set 3 CR +1 07/29/16, 10:00

  9. TYPO3com voted on patch set 3 V +1 07/29/16, 10:04 Completed build in 05m 37s on Fri, 29 Jul, 12:04 PM Test Summary: 19382 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1483

  10. Christian Kuhn commented on patch set 3 07/29/16, 10:07

    testing now
  11. Christian Kuhn commented on patch set 3 CR 0 07/29/16, 10:13

    SingleFieldContainer.php:72

    mmmh, maybe it would be even better if we actually check the type definition of the field to be sure. otherwise we may end up with false-positives in case the field is declared as input or whatever - which we probably don't want ... i'll play around a bit.
  12. Markus Klein commented on patch set 3 07/29/16, 11:15

    no playing please! you want that input works and also that passthrough works and anything else. This check must NOT take any conclusions from the way the data is fed into this field.
  13. Christian Kuhn commented on patch set 3 CR +1 07/29/16, 16:34

    good point. ok, +1 on reading, the testing vote will follow within 48h, latest.
  14. Andreas Kienast voted on patch set 3 CR +1 07/31/16, 11:13

  15. Christian Kuhn voted on patch set 3 V +1 08/01/16, 09:14

  16. Mathias Schreiber uploaded patch set 4 08/02/16, 20:20

  17. TYPO3com voted on patch set 4 V +1 08/02/16, 20:25 Completed build in 05m 03s on Tue, 2 Aug, 10:25 PM Test Summary: 18512 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1634

  18. Markus Klein commented on patch set 4 CR -1 V -1 08/02/16, 20:42

    group fields give us 'tx_ext_table_uid|label' here, which is a valid value
  19. Mathias Schreiber uploaded patch set 5 08/03/16, 08:08

  20. TYPO3com voted on patch set 5 V +1 08/03/16, 08:11 Completed build in 02m 49s on Wed, 3 Aug, 10:11 AM Test Summary: 18514 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1644

  21. Markus Klein commented on patch set 5 CR -1 08/03/16, 08:47

    SingleFieldContainer.php:74

    As I told Christian already, I dislike having explicit checks on the rendering definition! We MUST NOT take a any conclusions by inspecting how a field is rendered. This additionally introduces a hidden dependency on how the value is prepared in the processors.
  1. Mathias Schreiber commented on patch set 5 08/03/16, 12:46

    isn't anything else just guessing?
  2. Markus Klein commented on patch set 5 08/03/16, 12:50

    Anything else is ok. If a field is declared to be the translation parent it is okay to conclude that a non-empty value is a pointer for an existing parent. Nothing more nothing less. (If an array is given we do the same check on the first array item.)
  3. Mathias Schreiber commented on patch set 5 08/03/16, 12:54

    ok, so having the string value "Husel" in the DB field would make FormEngine conclude that it is working on an overlayed record. It does not matter, that by principle we are referring to the unique identifier of a record - "Husel" just became that unique record identifier and we let everything else after that work with that value. I do not consider this "side-effect-free", do you?
  4. Markus Klein uploaded patch set 6 08/03/16, 12:56

  5. Markus Klein commented on patch set 5 08/03/16, 12:57

    It is side effect free. If the dev fails to specify a valid l10n_parent field it's his fault. We do not care about the actual field value.
  6. Mathias Schreiber commented on patch set 6 08/03/16, 13:03

    > It is side effect free. Ok, I have nothing to add anymore...
  7. TYPO3com voted on patch set 6 V +1 08/03/16, 13:04 Completed build in 07m 56s on Wed, 3 Aug, 03:04 PM Test Summary: 18514 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1687

  8. Markus Klein commented on patch set 6 08/05/16, 17:43

    Ping. How to proceed here?
  9. Christian Kuhn commented on patch set 5 08/05/16, 19:59

    SingleFieldContainer.php:74 Reply

    hmm, i think this variant here is safe: we *know* those fields are usually a select or group definition, so let us make use of that here. imho, a false positive 'i am a language overlay' detection is worse than a not detected overlay: if a field is configured as text with string 'foo', the code would assume 'i am an overlay'. this could be fatal. so, having a dedicated check for select and group here and having a fallback to 'canBeInterpretedAsInteger()' sounds like a good trade-off to me.
  10. Markus Klein commented on patch set 6 08/06/16, 20:05

    @Christian: I disagree with "a false positive 'i am a language overlay' detection is worse than a not detected overlay". Both situations have the exact same fatality. In the end the editor enters wrong data somehow and your ext will potentially go nuts. We know nothing about how this field is configured in the wild, but I agree with general check on int/canbeInterpreted and special treating for select (array) and group (string variant)
  11. Christian Kuhn commented on patch set 6 08/09/16, 11:22

    so, you prefer set 5, too? should we re-push this version, then?
  12. Markus Klein commented on patch set 6 08/09/16, 11:26

    No, I don't agree with specific checks on the TCA, but I would only check for the type. I'll push an update, how I imagine that.
  13. Markus Klein uploaded patch set 7 08/09/16, 11:35

  14. TYPO3com voted on patch set 7 V +1 08/09/16, 11:38 Completed build in 02m 56s on Tue, 9 Aug, 01:38 PM Test Summary: 18474 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1955

  15. Markus Klein uploaded patch set 8 08/09/16, 11:39

  16. Markus Klein uploaded patch set 9 08/09/16, 11:40

  17. TYPO3com voted on patch set 8 V -1 08/09/16, 11:44 Completed build in 04m 09s on Tue, 9 Aug, 01:44 PM Test Summary: 18474 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1956

  18. TYPO3com voted on patch set 9 V +1 08/09/16, 11:44 Completed build in 03m 38s on Tue, 9 Aug, 01:44 PM Test Summary: 18474 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1957

  19. Georg Ringer voted on patch set 9 CR +1 V +1 08/09/16, 12:33

  20. Christian Kuhn voted on patch set 9 CR +2 V +2 08/12/16, 11:52

  21. Christian Kuhn voted on patch set 9 CR +1 V +1 08/12/16, 11:52

  22. Christian Kuhn voted on patch set 9 CR +2 V +2 08/14/16, 13:05

  23. Gerrit merged patch set 9 08/14/16, 13:05

  24. Christian Kuhn commented on patch set 10 08/14/16, 13:05

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 2a801a2753c3dd28e3de0e19a0988f6aa94068ac
  25. Helmut Hummel commented on patch set 10 08/14/16, 18:40

    great this is possible now. Thanks!