Review main Merged

63406[BUGFIX] Respect page TSconfig in drag & drop of page tree

Manuel Selbach CR +2 V +2 Normal +188 −7 updated 04/21/20, 13:51

Commit message

With this change the default values for new records in DataHandler are now
respected based on the resolved page ID, allowing to deal with pageTS for
specific sites or subpages.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Jonas Eberle +1
    • Riccardo De Contardi +1
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 2227

Show 12 earlier messages
  1. Manuel Selbach uploaded patch set 1 02/24/20, 18:55

  2. TYPO3com voted on patch set 1 V -1 02/24/20, 18:56 Completed build in 28s on Mon, 24 Feb, 06:55 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-646

  1. Manuel Selbach uploaded patch set 2 02/24/20, 20:46

  2. Riccardo De Contardi commented on patch set 2 V -1 02/24/20, 21:11

    after installing the patch I cannot delete pages - Log error: ``` Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to TYPO3\CMS\Core\DataHandling\DataHandler::recursiveFindByKey() must be of the type array, null given, called in /TYPO3-dists/typo3_master/typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 685 | TypeError thrown in file /TYPO3-dists/typo3_master/typo3/sysext/core/Classes/DataHandling/DataHandler.php in line 730. Requested URL: https://typo3.master.it:8890/typo3/index.php?route=%%2Fajax%%2Frecord%%2Fprocess&token=--AnonymizedToken-- ```
  3. Simon Gilli uploaded patch set 3 02/24/20, 21:19

  4. Simon Gilli commented on patch set 3 02/24/20, 21:20

    > Patch Set 2: Verified-1 > > after installing the patch I cannot delete pages - Log error: > > ``` > Core: Exception handler (WEB): Uncaught TYPO3 Exception: Argument 1 passed to TYPO3\CMS\Core\DataHandling\DataHandler::recursiveFindByKey() must be of the type array, null given, called in /TYPO3-dists/typo3_master/typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 685 | TypeError thrown in file /TYPO3-dists/typo3_master/typo3/sysext/core/Classes/DataHandling/DataHandler.php in line 730. Requested URL: https://typo3.master.it:8890/typo3/index.php?route=%%2Fajax%%2Frecord%%2Fprocess&token=--AnonymizedToken-- > ``` Fixed
  5. Manuel Selbach uploaded patch set 4 02/24/20, 21:22

  6. TYPO3com voted on patch set 2 V +1 02/24/20, 21:28 Completed build in 33m 58s on Mon, 24 Feb, 09:28 PM Test Summary: 71601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-654

  7. Simon Gilli voted on patch set 4 V +1 CR +1 02/24/20, 21:31

  8. Riccardo De Contardi commented on patch set 4 V +1 02/24/20, 21:39

    Verified on latest master with cases taken from https://forge.typo3.org/issues/88918#note-4 ``` TCAdefaults.pages{ no_search = 1 hidden = 0 no_index=1 no_follow=1 php_tree_stop = 1 cache_tags = TEST } ``` Create a page by the toolbar above the pagetree (drag-drop)> works Create a page using "Right-click in the Page Tree - New" > works Create a pate using "List view - New" > works Create a page with "Web-> Functions" > works
  9. TYPO3com voted on patch set 3 V +1 02/24/20, 21:56 Completed build in 15m 58s on Mon, 24 Feb, 09:56 PM Test Summary: 71601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-658

  10. Manuel Selbach commented on patch set 4 02/24/20, 21:58

    This change is ready for review.
  11. TYPO3com voted on patch set 4 V +1 02/24/20, 22:08 Completed build in 28m 35s on Mon, 24 Feb, 10:08 PM Test Summary: 71601 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-659

  12. Oli Bartsch voted on patch set 4 V +1 02/24/20, 22:13

  13. Benni Mack commented on patch set 4 CR -1 02/27/20, 20:58

    DataHandler.php:686 Unresolved

    We have code like this: $data = ['sys_file_reference' => 'NEW123' => ['pid' => 'NEW456'], 'pages' => 'NEW456' => ['pid' => 2]]; $pid = would be 'NEW456'; $pid = (int)NEW456; $pid = 0; Using TCAdefaults from defaultPageTS would then NOT be working at all. Using negative pid (= before/after) would NOT use TCAdefaults then. So this would make the whole logic _not working at all. Oh, and then we have workspaces and PID = -1... There is a reason why the PID resolving is really tricky, and this solution does not seem to cut it. I guess we need functional tests for this case.
  14. Benni Mack wrote 04/06/20, 09:55

    Topic set to DataHandler
  15. Benni Mack uploaded patch set 5 04/11/20, 20:27

  16. Benni Mack commented on patch set 5 04/11/20, 20:28

    Hey Manuel, I hope you don't mind but I took over your patch and took a different approach, which is a bit more bullet proof. I also added some tests to make sure we won't break it anymore. Feel free to give feedback or vote on it.
  17. TYPO3com voted on patch set 5 V +1 04/11/20, 20:38 Completed build in 10m 36s on Sat, 11 Apr, 08:38 PM Test Summary: 73378 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2379

  18. Riccardo De Contardi commented on patch set 5 V +1 04/12/20, 08:41

    Tested with latest master ``` TCAdefaults.pages{ no_search = 1 hidden = 0 no_index=1 no_follow=1 php_tree_stop = 1 cache_tags = TEST } ``` Create a page by the toolbar above the pagetree (drag-drop)> works Create a page using "Right-click in the Page Tree - New" > works Create a page using "Right-click in the Page Tree - More options - 'Create New' Wizard" > works Create a pate using "List view - New (button on the top bar) > works (*) Create a pate using "List view - New" > (page table list) > works (*) Create a page with "Web-> Functions" (Right-click in the Page Tree - More options - Create multiple pages) > works (*) There is a case where it does not work: when choosing the page position outside (on the same level) of the home page where the TSConfig is stored, but I think it is correct
  19. Jonas Eberle commented on patch set 5 V -1 04/13/20, 12:14

    It is not working for me. Neither copying nor moving. Tested with TCAdefaults.pages { hidden = 0 php_tree_stop = 1 cache_tags = OLALA }

    DataHandler.php:1102

    For me my PageTS TCAdefaults gets overwritten at this point. :(

    DefaultValuesTest.php:53 Unresolved

    I like that typo :)
  20. Jonas Eberle commented on patch set 5 V +1 04/13/20, 12:17

    Sorry, I missed the point!! This is about creating via drag&drop, not copying or moving ;) Yes, that works (I was not aware that THIS was the point that was broken before).
  21. Jonas Eberle commented on patch set 5 04/13/20, 12:19

    DataHandler.php:1102 Reply

    Done
  22. Benni Mack voted on patch set 5 V +1 CR +1 04/13/20, 21:10

  23. Georg Ringer voted on patch set 5 V +2 CR +2 04/14/20, 11:31

  24. Georg Ringer merged patch set 6 04/14/20, 11:31

  25. Benni Mack commented on patch set 6 04/21/20, 13:51