60329[BUGFIX] Do not generate links to versioned pages without proper context
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 3
Review log 911
-
Benjamin Franzke uploaded patch set 1 03/25/19, 11:03
-
Benjamin Franzke wrote 03/25/19, 11:04
Topic set to workspaces -
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
-
Benjamin Franzke commented on patch set 1 CR -1 03/25/19, 13:12
PageRepository.php:179UnresolvedThis 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). -
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. -
Benjamin Franzke uploaded patch set 2 03/25/19, 14:12
-
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
-
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 :\) -
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. -
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:177UnresolvedSuperseeded by superseeded by https://review.typo3.org/c/Packages/TYPO3.CMS/+/61073 -
Benjamin Franzke abandoned the change 04/30/20, 07:39
Superseeded by https://review.typo3.org/c/Packages/TYPO3.CMS/+/61073