Review main Merged

75401[BUGFIX] Avoid workspace field query for non workspaced table

Stefan Bürk CR +2 V +2 Nightmare +5582 −98 updated 08/12/22, 17:35

Commit message

With #97989 correct workspace overlays in DataMapProcessor
should be used to fix a bug. This introduced a failing default
"where" if a child table is not workspace aware.

The fix itself is straight forward: Query t3ver_wsid field
only if the target table is workspace aware.

On functional test level, a new scenario set is added to
look at details when a parent table like pages or tt_content
is workspace aware, but inline children are not. The new
test setup "test_inline_foreignfield_non_ws" is similar
to "test_inline_foreignfield", just without the frontend
scenarios, which are kinda useless here, at least for now.
They reveal various further inconsistencies we should take
care of with further patches. For now, these tests should
verify the hard "workspace column does not exist" fail
can't happen anymore in the future.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Chris Müller +1
    • Christian Kuhn +1
    • Oliver Hader +1
    • Thomas Löffler +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Chris Müller +1
    • Christian Kuhn +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 83

Show 63 more files

Review log 2531

Show 56 earlier messages
  1. Stefan Bürk uploaded patch set 1 08/09/22, 11:54

  2. core-ci voted on patch set 1 V -1 08/09/22, 12:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29972

  3. Stefan Bürk uploaded patch set 2 08/09/22, 12:04

  4. Chris Müller commented on patch set 1 08/09/22, 12:05

    When applying this patch, the problem is gone for a TCA configuration with no workspaces. But when I store another record which workspaces enabled I got now this error: PHP Warning: Array to string conversion in /var/www/html/vendor/typo3/cms-core/Classes/Database/Query/Expression/CompositeExpression.php line 166
  5. Chris Müller commented on patch set 2 08/09/22, 12:06

    Reply

    Okay, seems to be gone with patchset 2. Was too quick, I assume ;-)
  6. Stefan Bürk commented on patch set 2 08/09/22, 12:07

    Reply

    yeah - was the last " lets avoid tenary for it". See second patchset, this should work completly.
  1. core-ci voted on patch set 2 V +1 08/09/22, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29973

  2. Stefan Bürk commented on patch set 2 08/09/22, 12:15

    Reply

    Done
  3. Chris Müller voted on patch set 2 V +1 CR +1 08/09/22, 12:16

  4. Christian Kuhn commented on patch set 2 08/09/22, 13:22

    it was me who introduced the bug. as punishment, i'll try to come up with a functional test extension that delivers a non-ws-aware table and will add some tests.
  5. Thomas Löffler voted on patch set 2 CR +1 08/09/22, 15:24

  6. Christian Kuhn commented on patch set 2 CR -1 08/09/22, 16:33

    the fix is good, but i'll temp -1 this patch in order to add some tests. will push something today.
  7. Christian Kuhn commented on patch set 2 08/09/22, 21:20

    ok, will push not today but tomorrow, but i reproduced locally already and i'm setting up test cases now ...
  8. Christian Kuhn uploaded patch set 3 08/11/22, 12:08

  9. core-ci voted on patch set 3 V -1 08/11/22, 12:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30039

  10. Christian Kuhn uploaded patch set 4 08/11/22, 12:19

  11. Christian Kuhn commented on patch set 4 08/11/22, 12:21

    AbstractDataHandlerActionTestCase.php:215

    that's a drive-by: you must not call $this in a static closure.

    AbstractActionWorkspacesTestCase.php:28

    this one is covered by the full-new scenario.
  12. Christian Kuhn updated the commit message in patch set 5 08/11/22, 12:24

  13. core-ci voted on patch set 4 V +1 08/11/22, 12:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30040

  14. core-ci voted on patch set 5 V +1 08/11/22, 12:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30041

  15. Andreas Kienast commented on patch set 5 CR -1 08/11/22, 12:33

    DataMapProcessor.php:912

    Left-over debug foo?
  16. Christian Kuhn commented on patch set 5 08/11/22, 12:38

    DataMapProcessor.php:912 Reply

    thx!
  17. Christian Kuhn uploaded patch set 6 08/11/22, 12:38

  18. core-ci voted on patch set 6 V +1 08/11/22, 12:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30042

  19. Christian Kuhn voted on patch set 6 V +1 CR +1 08/11/22, 12:48

  20. Chris Müller voted on patch set 6 V +1 CR +1 08/11/22, 13:14

  21. Thomas Löffler voted on patch set 6 CR +1 08/11/22, 14:11

  22. Benni Mack voted on patch set 6 V +1 CR +1 08/11/22, 15:08

  23. Stefan Bürk commented on patch set 6 V +2 CR +2 08/11/22, 15:23

    @lolli Thank you for the tests !
  24. Stefan Bürk merged patch set 7 08/11/22, 15:24

  25. Oliver Hader voted on patch set 7 CR +1 08/12/22, 17:35