Review main Merged

53749[BUGFIX] Use TCA to get `type` field instead of hardcoded fieldname

Sascha Egerer CR +2 V +2 Easy +25 −9 updated 09/11/17, 17:25

Commit message

The `type` field is configured via TCA and that configuration must
be used instead of hardcoding the fieldname.

Also change arrangement of the DataProvider load order to load
InitializeProcessedTca directly after ReturnUrl. This avoids the
need of accessing $GLOBALS['TCA'].

Review

  • Code review CR +2
    • Benni Mack +2
    • Christian Kuhn +1
  • Verified V +2
    • Benni Mack +2
    • Christian Kuhn +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2330

Show 45 earlier messages
  1. Sascha Egerer uploaded patch set 1 08/20/17, 18:38

  2. TYPO3com voted on patch set 1 V -1 08/20/17, 18:48 Completed build in 10m 06s on Sun, 20 Aug, 08:48 PM Test Summary: 3641 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13848

  3. Georg Ringer commented on patch set 1 CR -1 08/21/17, 06:54

    DatabaseUserPermissionCheckTest.php:183

    this method name is already in use
  4. Jan Stockfisch voted on patch set 1 CR -1 08/21/17, 07:00

  5. Sascha Egerer uploaded patch set 2 08/21/17, 07:51

  1. TYPO3com voted on patch set 2 V -1 08/21/17, 08:03 Completed build in 11m 13s on Mon, 21 Aug, 10:03 AM Test Summary: 12 of 57956 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13851

  2. Sascha Egerer uploaded patch set 3 08/21/17, 09:18

  3. TYPO3com voted on patch set 3 V +1 08/21/17, 09:28 Completed build in 10m 20s on Mon, 21 Aug, 11:28 AM Test Summary: 57593 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13853

  4. Christian Kuhn commented on patch set 3 CR -1 08/22/17, 07:47

    will review today. don't like the global, but unsure if we can get rid of this.
  5. Christian Kuhn commented on patch set 3 CR +1 V +1 08/22/17, 09:28

    DatabaseUserPermissionCheck.php:118

    well ok. $result['processedTca'] can not be used here since the data provider which adds tca of the table to the result array is run later. I see no big benefit in using the global access here instead of the hardcoded 'doktype' field name, but it probably has no huge drawback either: this 'if' is dedicated for 'pages' table only, and probably nobody changes the 'type' of this.
  6. Jan Stockfisch commented on patch set 3 CR +1 V +1 08/22/17, 11:54

    Since the ability to change the 'type' a dynamic solution is necessary. I would prefer a solution without using $GLOBALS! But at this point, I don't see an other simple solution.
  7. Christian Kuhn commented on patch set 3 08/23/17, 20:34

    well, we could probably rewire the "InitializeProcessedTca" data provider and have that earlier in the chain. That provider depends only on "tableName" and this is set from outer caller, usually (needs detail check). This way we could get rid of the $globals access.
  8. Christian Kuhn commented on patch set 3 CR 0 V 0 08/23/17, 20:38

    checking this: yep, it should be easily possible to have InitializeProcessedTca much earlier. maybe directly after "ReturnUrl". DatabaseUserPermissionCheck could then access the type value from $result['processedTca'].
  9. Jan Stockfisch commented on patch set 3 CR 0 V 0 08/24/17, 09:28

    @Christian just tested it and seems to work like a charm! Will upload a patchset in a moment.
  10. Jan Stockfisch uploaded patch set 4 08/24/17, 10:01

  11. Jan Stockfisch uploaded patch set 5 08/24/17, 10:06

  12. TYPO3com voted on patch set 5 V +1 08/24/17, 10:18 Completed build in 11m 54s on Thu, 24 Aug, 12:18 PM Test Summary: 57730 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13989

  13. TYPO3com voted on patch set 4 V -1 08/24/17, 10:23 Completed build in 21m 57s on Thu, 24 Aug, 12:23 PM Test Summary: 19 of 58093 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13988

  14. Jan Stockfisch uploaded patch set 6 08/24/17, 10:45

  15. TYPO3com voted on patch set 6 V +1 08/24/17, 10:57 Completed build in 11m 33s on Thu, 24 Aug, 12:57 PM Test Summary: 57730 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-13990

  16. Benni Mack commented on patch set 6 CR +1 09/10/17, 14:55

    solutions looks good.
  17. Sonja Großewinkelmann voted on patch set 6 CR +1 09/11/17, 07:57

  18. Christian Kuhn commented on patch set 6 09/11/17, 08:00

    DefaultConfiguration.php:581

    this should be DatabaseParentPageRow to keep the "strict" order here (makes the final order easier to understand, especially if own data providers are added somewhere)
  19. Christian Kuhn uploaded patch set 7 09/11/17, 12:26

  20. Christian Kuhn commented on patch set 7 CR +1 V +1 09/11/17, 12:34

    minor cleanup and removed 7.6 (not a critical fix).
  21. TYPO3com voted on patch set 7 V +1 09/11/17, 12:46 Completed build in 19m 29s on Mon, 11 Sep, 02:46 PM Test Summary: 58146 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-14865

  22. Benni Mack voted on patch set 7 CR +2 V +2 09/11/17, 17:02

  23. Gerrit merged patch set 7 09/11/17, 17:02

  24. Benni Mack commented on patch set 8 09/11/17, 17:02

    Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit c64e813e05674497d9f5ad111e517003c23b2b95
  25. Mathias Schreiber commented on patch set 8 09/11/17, 17:25

    this change makes no sense. First off, the doktype is ACL-related, while the "type" of pages is not. So I could reconfigure the type field of pages completely independent from what I can set as ACLs. I do agree to some extent that changing the type field of pages makes little sense, yet it is possible. So unless the ACLs reflect what is used as a type field on üages or this change needs to be reverted.