Review main Abandoned

61998[WIP][TASK] Remove workspace placeholder for new versions

Benni Mack CR 0 V 0 Hard +291 −84 updated 12/27/19, 20:40

Commit message

When a new record is added in a workspace, two database entries are added:

NEW_PLACEHOLDER_VERSION (t3ver_state = -1)
A "dummy" record containing the workspace ID, and the correct PID, thus sorting etc is respected where the record is added - but nothing else.

NEW_PLACEHOLDER (t3ver_state = 1)
A record that contains all data that is added in a workspace.

Since no check is made against the "pid" in this regard anymore, the "-1" record can be dropped and the NEW_PLACEHOLDER can be used directly. This also removes the necessity to handle placeholder shadowing for new versions, thus reducing complexity.

The main changes when querying data is that workspace-related restrictions are now checking for "t3ver_state <= 1" instead of "t3ver_state <= 0" as the "-1" does not exist, but the "1" state should be included as well (as there is no overlay then anymore).

However, on publishing, EXT:workspaces DataHandlerHook previously did a "swap" / "publish" with the NEW_PLACEHOLDER_VERSION record which does not exist anymore, so the publishing functionality needs to be adapted to handle publishing of new records without the "version_swap()" logic.

In this case, this will reduce overhead and performance when handling new records, and also
remove one "overlay" functionality in TYPO3 v10.

ToDo:
- Rewrite "version_swap()" when having new records (no swapping, just publishing) - need tests for that
- Check relation handling
- Create a migration wizard to remove t3ver_state = -1 and update t3ver_state=1 records with the correct "pid" and remove "t3ver_oid"
- Adapt tests
- Check frontend rendering
- Add Important RST file for people who do not use TYPO3's internal DB Restrictions

Review

  • Code review CR 0
  • Verified V 0

Files 17

Review log 59

  1. Benni Mack uploaded patch set 1 10/15/19, 10:06

  2. TYPO3com voted on patch set 1 V -1 10/15/19, 10:15 Completed build in 09m 16s on Tue, 15 Oct, 10:15 AM Test Summary: 715 of 48341 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37329

  3. Benni Mack uploaded patch set 2 10/15/19, 18:35

  4. TYPO3com voted on patch set 2 V -1 10/15/19, 18:45 Completed build in 09m 36s on Tue, 15 Oct, 06:45 PM Test Summary: 716 of 48341 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37344

  5. Benni Mack uploaded patch set 3 10/16/19, 18:57

  6. TYPO3com voted on patch set 3 V -1 10/16/19, 19:08 Completed build in 11m 13s on Wed, 16 Oct, 07:08 PM Test Summary: 592 of 48341 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37361

  7. Benni Mack uploaded patch set 4 10/16/19, 19:55

  8. TYPO3com voted on patch set 4 V -1 10/16/19, 20:05 Completed build in 09m 46s on Wed, 16 Oct, 08:05 PM Test Summary: 554 of 48341 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37364

  9. Benni Mack abandoned the change 12/27/19, 20:40

    nothing happened...