1. 04 Jan, 2022 1 commit
  2. 19 Nov, 2021 1 commit
  3. 24 Sep, 2021 1 commit
  4. 13 Aug, 2021 1 commit
  5. 28 Jul, 2021 1 commit
  6. 27 May, 2021 1 commit
  7. 07 May, 2021 1 commit
  8. 12 Nov, 2020 1 commit
    • Benni Mack's avatar
      [!!!][TASK] Do not create new version placeholders in workspaces anymore · 74899ecf
      Benni Mack authored
      Creating a new record in a workspace adds two database rows.
      
      One that is the "placeholder", which - since v10.4 - contains
      the same metadata as the other record:
      
      * t3ver_wsid = workspaceID
      * t3ver_oid = 0 (simulating behavior of an "online pendant record")
      * t3ver_state = 1
      
      And the "versionized" record, identified by:
      
      * t3ver_wsid = workspaceID
      * t3ver_oid = uid of the new placeholder record
      * t3ver_state = -1
      
      As of TYPO3 v10, the first record is not needed anymore,
      the versioned record can be queried directly, however, since
      the relations (except MM) point to the placeholder record,
      this one is kept.
      
      As result, only one record is created from now on:
      
      * t3ver_wsid = workspaceID
      * t3ver_oid = 0 (no online counterpart)
      * t3ver_state = 1
      
      On reading, the record is queried directly (no overlay needed anymore!)
      with the existing Database Doctrine Restrictions. On publishing, the
      record just gets the state/stage/wsid set and is "live".
      
      This brings fundamental benefits:
      
      * No overlays needed when querying
      * Fewer database records (placeholders are not helpful)
      * Conceptual problems with placeholder and shadowed fields are removed
      
      Resolves: #92791
      Releases: master
      Change-Id: I0288cc63fe72d8442d586f309bd4054ac44e829b
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65587
      
      
      Tested-by: default avatarTYPO3com <noreply@typo3.com>
      Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
      74899ecf
  9. 19 Oct, 2020 1 commit
  10. 12 Oct, 2020 1 commit
    • Benni Mack's avatar
      [!!!][TASK] Remove move placeholders · 27c7de8a
      Benni Mack authored and Christian Kuhn's avatar Christian Kuhn committed
      Workspaces ("Element-based versioning") previously had - due to
      the "pid=-1" logic until TYPO3 v10 - a so-called "MOVE PLACEHOLDER".
      
      This was indicated by t3ver_state = 3, all relevant fields:
      * t3ver_state = 3 (move placeholder)
      * t3ver_oid = 0 no connected live record, it allowed fetching these records
        with one query together with live records as db restrictions t3ver_oid > 0
      * t3ver_wsid = workspace UID
      * t3ver_move_id = UID of the live record
      * pid = new PID the version was moved to
      * sorting - when a record was moved within page with activated sorting
      
      Other record fields were not important. However, when moving a record, the
      value from TCA ctrl section "shadowColumnsForMovePlaceholders" was used to
      fill in gaps from the live record.
      
      The ACTUAL versioned record was indicated by t3ver_state = 4, the so-called
      "MOVE POINTER". In previous version until TYPO3 v10, it's PID field was set
      to -1, but since TYPO3 v10, it has the same PID as the "MOVE PLACEHOLDER".
      
      Characteristics of the move pointer as of TYPO3 v10:
      * t3ver_state = 4 (move pointer)
      * t3ver_oid = UID of the live record
      * t3ver_wsid = workspace UID
      * t3ver_move_id = 0
      * pid = PID the version was moved to
      * sorting - same value as the live record (not evaluated until now)
      * All other fields with optionally modified content
      
      Both move placeholder and move pointer did not know each other directly.
      Fetching the move pointer for a move placeheldor (or the other way around)
      involved the live record, leading to many queries.
      
      The patch obsoletes the move placeholder records, moving necessary
      information to the move pointer: It now contains the updated sorting
      and is considered in the Database Restrictions to be fetched.
      
      In general, when publishing, the moved record now
      behaves identical to the other versioned types.
      
      This makes the internal code much easier, creates less DB queries
      on read + write and leads to less DB records in the database.
      
      The change removes creation of move placeholders, and considers the
      move pointers when evaluating sorting and PID in DataHandler.
      
      Read functionality from BackendUtility and PageRepository don't need an
      additional step to fetch the live version of a move placeholder anymore.
      
      An upgrade wizard takes existing move placeholders (state=3), updates
      pid+sorting (PID generally not needed, just to be sure) of the move
      pointer (state=4) and then deletes the move placeholder.
      
      TCA definition $TCA[my-table][ctrl][shadowColumnsForMovePlaceholders]
      is not needed anymore and removed by an auto TCA migration.
      
      Finally, workspace enabled tables do not need the t3ver_move_id field
      anymore: The live record UID is already in t3ver_oid field for state=4
      records, just like with all other versioned records. The field will
      be fully removed with a separate patch in order to keep the actual CSV
      tests readable for this patch.
      
      Resolves: #92497
      Releases: master
      Change-Id: I206336aec8be8a324fefdfd69f648f5a298c6ad1
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65797
      
      
      Tested-by: default avatarTYPO3com <noreply@typo3.com>
      Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
      Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      27c7de8a
  11. 02 Sep, 2020 1 commit
  12. 17 Aug, 2020 1 commit
  13. 07 Aug, 2020 1 commit
  14. 03 Aug, 2020 1 commit
    • Benni Mack's avatar
      [!!!][TASK] Remove t3ver_count and t3ver_tstamp db fields · 80a38d73
      Benni Mack authored and Anja Leichsenring's avatar Anja Leichsenring committed
      The patch drops handling and existence of two further
      workspaces related db fields:
      
      * t3ver_tstamp has been occassionally set to 'now' when
      records in a workspaces were edited. However, the field
      was never displayed in the backend and is of little use
      since it only holds only a 'last' value. A change
      history on workspace records is available through the
      'info' button in the workspace module. This is powered
      by sys_history and shows modifications with date/time.
      
      * t3ver_count is also never rendered in the backend. It
      has been used in the (non-default) 'swap' workspace actions
      where live records become the new workspace records. The
      field was then incremented by one. The loose wording around
      that is, it's an 'archived' record. However, if swapping a
      second time, the workspace record does not count two as one
      would expect, but still one. Only after another swap, the
      workspace record would have the value two in this field.
      Together with the fact this field has never been shown/used,
      the weird behavior, and that swapping is an uncommon case
      that needs to be explicitely enabled and used, the field
      is dropped now.
      
      Resolves: #89137
      Releases: master
      Change-Id: I7cdfe6e867c14462395d7398123b14464835c1bf
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65145
      
      
      Tested-by: default avatarTYPO3com <noreply@typo3.com>
      Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
      Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
      Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
      80a38d73
  15. 23 Jul, 2020 1 commit
  16. 03 Jun, 2020 1 commit
  17. 17 Apr, 2020 1 commit
  18. 15 Apr, 2020 1 commit
  19. 14 Apr, 2020 1 commit
  20. 13 Apr, 2020 1 commit
  21. 11 Sep, 2019 1 commit
    • Benni Mack's avatar
      [BUGFIX] Do not check for pid=-1 when evaluating workspace records · a6363e85
      Benni Mack authored and Susanne Moog's avatar Susanne Moog committed
      TYPO3 Core handles the result of database queries in a lot of different
      ways to filter out workspace records.
      
      With "versioning support v1" (= without workspaces), the identifier was
      usually "pid = -1" to filter out records that should not be displayed in
      live results.
      
      With workspaces, there are other, better ways to identify versioned via
      the following fields:
      - t3ver_state (what kind of versioned record is there)
      - t3ver_oid (if the versioned record points to a live record)
      - t3ver_wsid (the workspace ID)
      
      The "pid" field was kept as misuse, but fine for most of the database
      queries. Since we now have Doctrine DBAL, and Restrictions, the Core
      API can now be unified to actually check for "t3ver_oid>0" instead of
      "pid<>-1" to identify a versioned record.
      
      All places in TYPO3 Core now does not check for "pid<>-1" anymore for
      tables that are workspace-aware.
      
      In the future, it is then possible to get rid of the "pid=-1" value when
      writing versioned records, streamlining the API effectively, to find one
      proper way to query and write records.
      
      This change does not modify any other places in TYPO3 Core where
      Workspace Records are written, but only cleans up the API to only
      consider "t3ver_oid" instead of "pid", avoiding the mis-use of "pid".
      
      Most queries can then be handled by simply checking:
      - t3ver_wsid=0 AND deleted=0 for only fetching live records
      - t3ver_wsid IN (0,12) AND t3ver_oid=0 to find all live records,
        and draft placeholders, to do overlays then
      
      Resolves: #89122
      Releases: master
      Change-Id: I781d1ae440fe944e6c8c99d02884a6eb0c1be0a7
      Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61641
      
      
      Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
      Tested-by: default avatarTYPO3com <noreply@typo3.com>
      Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
      Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
      Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
      a6363e85
  22. 15 May, 2019 1 commit
  23. 07 May, 2019 1 commit
  24. 03 Mar, 2019 1 commit
  25. 09 Jan, 2019 1 commit
  26. 07 Jan, 2019 1 commit
  27. 16 Nov, 2018 1 commit
  28. 13 Oct, 2018 1 commit
  29. 25 Sep, 2018 1 commit
  30. 12 Aug, 2018 1 commit
  31. 13 Jan, 2018 1 commit
  32. 15 Dec, 2017 1 commit
  33. 09 Dec, 2017 1 commit