Review main Merged

64516[BUGFIX] Re-add initialization of PageRepository::$where_groupAccess

Thomas Hohn CR +2 V +2 Easy +2 −0 updated 05/19/20, 10:54

Commit message

Re-added `$this->where_groupAccess` to init method.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Oliver Hader +1
    • Benni Mack +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1822

  1. Thomas Hohn uploaded patch set 1 05/18/20, 12:51

  2. TYPO3com voted on patch set 1 V -1 05/18/20, 13:04 Completed build in 12m 42s on Mon, 18 May, 01:04 PM Test Summary: 1 of 74284 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3436

  3. Oliver Hader voted on patch set 1 CR +1 05/18/20, 13:08

  4. Oliver Hader updated the commit message in patch set 2 05/18/20, 13:10

  5. Oliver Hader voted on patch set 2 CR +1 05/18/20, 13:10

  6. TYPO3com voted on patch set 1 V +1 05/18/20, 13:14 Completed build in 35m 14s on Mon, 18 May, 01:14 PM Test Summary: 73799 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3436

  7. TYPO3com voted on patch set 2 V -1 05/18/20, 13:21 Completed build in 11m 14s on Mon, 18 May, 01:21 PM Test Summary: 1 of 74283 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3437

  8. Andreas Kienast commented on patch set 2 CR -1 05/18/20, 13:38

    PageRepository.php:156

    This overrides the value set in the constructor, which renders the initialization superfluous. This can't be right, no?
  9. TYPO3com voted on patch set 2 V +1 05/18/20, 13:41 Completed build in 42m 49s on Mon, 18 May, 01:41 PM Test Summary: 73799 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3437

  10. Thomas Hohn commented on patch set 2 05/18/20, 13:49

    PageRepository.php:156 Reply

    This was so before - there is a guard in the constructor - Benni is under the impression that he removed it by accident..
  11. Andreas Kienast voted on patch set 2 CR 0 05/18/20, 14:16

  12. Oliver Hader commented on patch set 2 CR -1 05/18/20, 19:30

    PageRepository.php:156 Reply

    And actually Benni's impression seems to be correct... by looking to the whole code (including the constructor), I wonder that this change actually fixes the bug * init (protected) sets it to empty string * constructor sets it to context-base value Does ext:solr have it's own PageRepository extending the core class (I don't think so)?
  13. Oliver Hader commented on patch set 2 05/18/20, 19:32

    PageRepository.php:156 Reply

    *"impression does not seem to be correct" (correction of my previous comment)
  14. Thomas Hohn commented on patch set 2 05/18/20, 19:58

    > Patch Set 2: > > (1 comment)

    PageRepository.php:156 Reply

    I took the whole PageRepository class from 9.5.16 and "pasted" it into 9.5.17 and it works again. Then I debugged it down to this missing statement. The Solr version I use 8.x also calls the init method explicit, through "magic. Somehow it must assumes that the $this->where_groupAccess would be set to the empty string. The Solr code looks like and returns a "weird" rootline without this reset. I also heard about others having trouble indexing pages with TYPO3 9.5.17: public static function getAccessRootlineByPageId( $pageId, $mountPointParameter = '' ) { $accessRootline = GeneralUtility::makeInstance(Rootline::class); $pageSelector = GeneralUtility::makeInstance(PageRepository::class); $pageSelector->init(false); $rootline = $pageSelector->getRootLine($pageId, $mountPointParameter); $rootline = array_reverse($rootline); ...} So yes I mean that this is the cause. So if it was removed by "accident" then please re-add it.
  15. Oliver Hader commented on patch set 2 05/18/20, 20:04

    Thomas, thanks for your reply. I don't know how to put that different - but by reading the code in context (including __constructor, I did not check that for my previous vote) it actually does not make a difference. This aspect would have been discovered when actually testing the patch in production. However, I was digging a bit further in the mentioned original change - yes, there seem to be some unconsidered tasks - specifically using frontend user groups and time-controlled content. I've pasted them into a new ticket → https://forge.typo3.org/issues/91432 Since ext:solr is (probably) using many different implicit contexts when invoking PageRepository, it's probably the reason for the misbehavior you experienced.
  16. Oliver Hader commented on patch set 2 CR 0 05/18/20, 20:15

    Thomas, can you please post the reference to ext:solr where this is used - maybe I'm overlooking something (I checked master version of ext:solr).
  17. Benni Mack commented on patch set 2 V +1 CR +1 05/18/20, 20:33

    This fix is correct for older versions of EXT:solr and TYPO3 v9, so I think this should be re-added properly.
  18. Oliver Hader commented on patch set 2 CR +1 05/18/20, 22:08

    Thx for your feedback Benni! For plain use-cases without ext:solr at least it does not modify the behavior - fine with me.
  19. Thomas Hohn commented on patch set 2 05/19/20, 04:30

    > Patch Set 2: -Code-Review > > Thomas, can you please post the reference to ext:solr where this is used - maybe I'm overlooking something (I checked master version of ext:solr). Solr versions below 10 would be affected - I'll inform the Solr team via the slack channel
  20. Thomas Hohn commented on patch set 2 05/19/20, 04:31

    > Patch Set 2: > > > Patch Set 2: -Code-Review > > > > Thomas, can you please post the reference to ext:solr where this is used - maybe I'm overlooking something (I checked master version of ext:solr). > > Solr versions below 10 would be affected - I'll inform the Solr team via the slack channel It's the method public static function getAccessRootlineByPageId()
  21. Georg Ringer voted on patch set 2 V +2 CR +2 05/19/20, 10:54

  22. Georg Ringer merged patch set 3 05/19/20, 10:54