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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Files 17