Review main Abandoned

60329[BUGFIX] Do not generate links to versioned pages without proper context

Benjamin Franzke CR 0 V 0 Easy +7 −12 updated 04/30/20, 07:39

Commit message

..even if the page overlay id has been explicitly specified as target.
That is to conform the the link generation for disabled/hidden pages
where an empty link is generated as well.

This patch removes a previous boolean argument to enableFields() which
caused the pid <> -1 restriction to be skipped. This restriction is
necessary as a record with t3ver_state = VersionState::DEFAULT_STATE
points to a draft record when pid equals -1 (see doc-comment for that
constant).

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 911

  1. Benjamin Franzke uploaded patch set 1 03/25/19, 11:03

  2. Benjamin Franzke wrote 03/25/19, 11:04

    Topic set to workspaces
  3. TYPO3com voted on patch set 1 V -1 03/25/19, 11:20 Completed build in 16m 42s on Mon, 25 Mar, 12:20 PM Test Summary: 3 of 47650 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32948

  4. Benjamin Franzke commented on patch set 1 CR -1 03/25/19, 13:12

    PageRepository.php:179 Unresolved

    This propbably needs to be fixed in PageRepository::enableFields instead. (Which does only check for t3ver_state <= 0 - while a draft record may use t3ver_state = 0, trogether with pid = -1, see VerstioNState:DEFAULT_STATE.) Will investigate what the correct check is (checking for t3ver_wsid = 0 or pid != -1).
  5. Oliver Hader commented on patch set 1 03/25/19, 13:16

    I have the same feeling to put it into enableFields... The "correct" check most probably is `t3ver_wsid = 0 AND t3ver_state <= 0 AND pid <> -1` - discarded workspace versions are moved back to `t3ver_wsid=0` - otherwise `t3ver_wsid = 0` would be sufficient.
  6. Benjamin Franzke uploaded patch set 2 03/25/19, 14:12

  7. TYPO3com voted on patch set 2 V +1 03/25/19, 14:27 Completed build in 15m 12s on Mon, 25 Mar, 03:27 PM Test Summary: 47257 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32950

  8. Benjamin Franzke commented on patch set 2 03/25/19, 15:44

    Thanks for the info regarding discarded workspace overlays, that's of great help. It means we really want pid != -1 here – which is already available in enableFields() but was disabled using the negated boolean argument $noVersionPreview which was set to `true`. So I've changed that prameter to the default (false) now. The question is: Do we want to add t3ver_wsid=0 additionally. Pro: * it's more obvious when reading the code * may prevent bugs which could be caused due to invalid column combinations in the database (think of a record tuple: t3ver_wsid=1, pid=0, t3ver_state=0) Con: * it would be redundant: would be one unnecessary condition which can be avoided => I'd prefer leaving it out for now, and rather get rid of the redundancy by removing pid = -1 at some point and reflecting that state by t3ver_wsid != 0 instead. (Yes, that'd need a new VersionState and a migration of the discarded records :\)
  9. Benni Mack commented on patch set 2 04/30/20, 07:31

    I think we can abandon this change... the current code in the test results in the same behaviour as you drafted here.
  10. Benjamin Franzke commented on patch set 2 04/30/20, 07:38

    Yes, true for v10. I had one comment to PageRepository (that i'm posting now) in Draft and forgot to send it :\ That confirms that. The change in 61073 superseded this change, but was only merged to master (10.4), so I guess this is still present with 9.5 Anyway, I will abandon as I do no longer see this as a priority change for 9.5.

    PageRepository.php:177 Unresolved

  11. Benjamin Franzke abandoned the change 04/30/20, 07:39