Review main Merged

11127[BUGFIX] Don't show duplicates in workspace preview

Thorsten Kahler CR +2 V +2 Normal +81 −5 updated 09/26/13, 16:32

Commit message

Fixed workspace filters in case of workspace preview
in TYPO3\CMS\Frontend\Page\PageRepository::enableFields().

Additionally cleared up the corresponding comments.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Sascha Egerer +1
    • Anja Leichsenring +1
  • Verified V +2
    • Stefan Neufeind +2
    • Sascha Egerer +1
    • Anja Leichsenring +1

Files 2

Review log 39

Show 14 earlier messages
  1. Thorsten Kahler uploaded patch set 2 05/27/13, 17:19

  2. Thorsten Kahler commented on patch set 3 05/27/13, 17:19

    @Tolleiv: What I meant: move-to placeholders are /usually/ not filtered out by their pid value *when in workspace preview* ;) (Move-to placeholders can be ignored when enableFields() is called from getWorkspaceVersionOfRecord() (which is the only case this change addresses): t3lib_pageSelect::versionOL() already has resolved them to their "original record" by a call to t3lib_pageSelect::movePlhOL(). getWorkspaceVersionOfRecord() now tries to find a versioned record of that original record in current workspace (t3ver_state=4). And that versioned record has pid=-1 and would not be found if the pid condition can't be disabled here.) getWorkspaceVersionOfRecord() searches explicitly for the versioned records which are located at pid=-1 (in comparison to the placeholders with a "real" pid). So the flag $noVersionPreview is required to activate the generic "enablecolumns" check but disable the pid check.
  3. Thorsten Kahler commented on patch set 3 05/27/13, 17:19

    @Tolleiv: There's only one place (in the core) where enableFields() is called with $noVersionPreview=TRUE: in t3lib_pageSelect::getWorkspaceVersionOfRecord(). In all other cases records with pid=-1 are filtered out. So the move-to-placeholders are usually found. But in t3lib_pageSelect::getWorkspaceVersionOfRecord() the pid-check has to be suppressed to retrieve the versioned records (from pid=-1), not the placeholders.
  4. Thorsten Kahler uploaded patch set 4 05/27/13, 17:19

  5. Thorsten Kahler commented on patch set 4 05/27/13, 17:19

    Added unit tests and changed the code comment.
  6. Thorsten Kahler uploaded patch set 5 05/27/13, 17:19

  7. Thorsten Kahler commented on patch set 6 05/27/13, 17:19

    Rebased after major refactorings of core.
  8. Thorsten Kahler uploaded patch set 6 05/27/13, 17:19

  9. Thorsten Kahler uploaded patch set 7 05/27/13, 17:19

  10. Thorsten Kahler commented on patch set 8 05/27/13, 17:19

    Rebased.
  11. Thorsten Kahler uploaded patch set 8 05/27/13, 17:19

  12. Tolleiv Nietsch commented on patch set 3 05/27/13, 17:19

    No score Hm ok - removed my -2, if that's the only context which is relevant in that case... would you mind to add that description as an inline comment - to make sure this isn't forgotten?
  13. Tolleiv Nietsch commented on patch set 3 05/27/13, 17:19

    Do not submit This can't be right .... move-to-placeholders have a pid <> -1 but t3ver_state=3 (see http://typo3.org/documentation/document-library/core-documentation/doc_core_inside/4.2.0/view/2/7/)
  14. Tolleiv Nietsch commented on patch set 3 05/27/13, 17:19

    @Thorsten I doubt that the move-to-placeholders are usually found, I'd assume that they are usually ignored ;) ...
  1. Stefan Galinski uploaded patch set 3 05/27/13, 17:19

  2. Christian Kuhn commented on patch set 3 05/27/13, 17:19

    I would prefer that you didn't submit this It should be pretty easily possible to add a unit test for this bugfix.
  3. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

    Fails; I would prefer that you didn't submit this Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/4013/ : FAILURE
  4. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  5. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  6. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  7. Mr. Jenkins commented on patch set 6 05/27/13, 17:19

    Fails; I would prefer that you didn't submit this Build Failed https://ci.typo3.org/job/typo3-v4-core-gerrit/6115/ : FAILURE
  8. Mr. Jenkins commented on patch set 7 05/27/13, 17:19

  9. Mr. Jenkins commented on patch set 8 05/27/13, 17:19

  10. Timo Webler uploaded patch set 9 08/15/13, 15:10

  11. Mr. Jenkins commented on patch set 9 08/15/13, 15:12

  12. Sascha Egerer voted on patch set 9 V +1 CR +1 09/04/13, 14:25

  13. Sascha Egerer uploaded patch set 10 09/18/13, 14:09

  14. Mr. Jenkins commented on patch set 10 09/18/13, 14:10

  15. Anja Leichsenring commented on patch set 10 V -1 09/18/13, 19:50

    two unittests fail with message 'RuntimeException: TYPO3 Fatal Error: No database selected!'. Seems to be incomplete mocking.
  16. Sascha Egerer uploaded patch set 11 09/19/13, 05:38

  17. Sascha Egerer voted on patch set 11 V +1 CR +1 09/19/13, 05:47

  18. Mr. Jenkins commented on patch set 11 09/19/13, 06:11

  19. Anja Leichsenring voted on patch set 11 V +1 CR +1 09/19/13, 06:44

  20. Stefan Neufeind commented on patch set 11 V +2 CR +2 09/23/13, 23:37

    Read code. Tested using unit-test and blog_example (as suggested on forge).
  21. Stefan Neufeind merged patch set 12 09/23/13, 23:37

  22. Stefan Neufeind commented on patch set 12 09/23/13, 23:37

    Cherry Picked This patchset was cherry picked to change: I088928a88cb673f18f218ef691a6c528019317c0
  23. Stefan Neufeind commented on patch set 12 09/23/13, 23:38

    Cherry Picked This patchset was cherry picked to change: I088928a88cb673f18f218ef691a6c528019317c0
  24. Stefan Neufeind commented on patch set 12 09/23/13, 23:45

    still needs backport to 4.5 please For 4.5 the main patch would be in t3lib/class.t3lib_page.php That unittest-file does not exist yet. However since it is small, it should be doable to port that over completely as well.
  25. Thorsten Kahler commented on patch set 12 09/26/13, 16:32