Review main Merged

88746[BUGFIX] Avoid undefined array key in ReferenceIndex

Till Hörner CR +2 V +2 Easy +8 −1 updated 04/07/25, 14:55

Commit message

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1720

  1. Till Hörner uploaded patch set 1 03/25/25, 15:11

  2. Andreas Kienast commented on patch set 1 03/25/25, 15:15

    Thank you for your patch. I just have a minor remark.

    ReferenceIndex.php:847

    IMO, checking for `isset($rows[$item['id']])` would be better to avoid a no-op `array_merge`.
  3. Christian Kuhn commented on patch set 1 03/25/25, 15:16

    ReferenceIndex.php:847

    hmm. this smells a bit funny: why does a simple query with removed restrictions for uid not find the row when the RelationHandler did? how to reproduce this case? how did you stumble upon it?
  4. Till Hörner commented on patch set 1 03/25/25, 15:21

    ReferenceIndex.php:847 Reply

    i am working on an upgrade from v10 to v13 and stumbled across this when updating the reference index. i guess there are references to deleted records, so the query does not find them anymore
  5. core-ci voted on patch set 1 V +1 03/25/25, 15:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76271

  6. Till Hörner uploaded patch set 2 V +1 03/25/25, 15:25

  7. Till Hörner commented on patch set 2 03/25/25, 15:26

    ReferenceIndex.php:847 Reply

    Done
  8. Christian Kuhn commented on patch set 2 03/25/25, 15:31

    ReferenceIndex.php:847 Reply

    thx. could you debug a tiny bit further to see if an 'inline csv' relation is involved in this case (where the parent row has a field with a comma list of children)?
  9. Christian Kuhn commented on patch set 2 03/25/25, 15:33

    ReferenceIndex.php:847 Reply

    (i understand we can easily sanitize this call, but i'd like to understand why this is needed)
  10. core-ci voted on patch set 2 V +1 03/25/25, 15:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76278

  11. Till Hörner commented on patch set 2 03/25/25, 18:55

    ReferenceIndex.php:847 Reply

    sure, here is how you can reproduce this with EXT:styleguide: 1. goto page "inline 11" 2. open a "tx_styleguide_inline_11" record and create a child record 3. delete the child record from the list module (not inside the parent) 4. run "bin/typo3 cleanup:deletedrecords -v" 5. run "bin/typo3 cleanup:missingrelations -vv --update-refindex"
  12. Benni Mack wrote 04/02/25, 06:24

    Hashtag added: lolli-feedback
  13. Christian Kuhn uploaded patch set 3 V +1 04/03/25, 12:35

  14. Christian Kuhn commented on patch set 3 04/03/25, 12:37

    ReferenceIndex.php:847 Reply

    confirmed. thanks for reproduce information! i think the issue is a bit deeper, but i'm unable to fix the root issue right now. we'll go ahead with your proposed sanitation change, and i'm adding an @todo pointing out that something is not quite right here.
  15. core-ci voted on patch set 3 V +1 04/03/25, 12:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/76949

  16. Christian Kuhn voted on patch set 3 CR +1 V +1 04/03/25, 13:17

  17. Benni Mack voted on patch set 3 CR +1 V +1 04/03/25, 13:29

  18. Christian Kuhn voted on patch set 3 CR +2 V +2 04/03/25, 13:30

  19. Christian Kuhn merged patch set 4 04/03/25, 13:31

  20. Benni Mack wrote 04/07/25, 14:55

    Hashtag removed: lolli-feedback