#89555Querying records in workspaces does not return all proper values due to "pid=-1" database
Description
Versioned records have “pid=-1” due to heavy legacy reasons before we had Doctrine DBAL and Restrictions, where one could accidentally query versioned records in their third party extension.
“pid=-1” has several drawbacks on versioned records:
- One could never query results properly by doing SQL queries on versioned records (as only equivalent live records were selected, and then overlaid)
- Unnecessary logic regarding moving and sorting due to versioned records
I propose to migrate to the proper “pid” of the live version, and look at “t3ver_oid” (live record) as all queries in the Core are already work based on this field.
An upgrade wizard then sets the “pid” field properly for all existing versions.
Reviews 12
- main 75915[TASK] Avoid negative pid's in SQL schema
- main 72549[!!!][TASK] Remove v9->v10 upgrade wizards
- 10.4 71920[BUGFIX] Fix cache clearing when publishing from workspace
- main 71799[BUGFIX] Fix cache clearing when publishing from workspace
- 10.4 65209[BUGFIX] Workspace preview shows correct pages in sub menus
- main 65212[BUGFIX] Workspace preview shows correct pages in sub menus
- 10.4 65153[BUGFIX] Discard only workspace records if deleting workspace
- main 65136[BUGFIX] Discard only workspace records if deleting workspace
- main 61699[TASK] Keep pid for versioned records
- 10.4 65029[BUGFIX] Translation wizard shows correct elements in workspace
- main 65076[BUGFIX] Translation wizard shows correct elements in workspace
- main 64257[BUGFIX] Resolve pid for records being pasted
Related issues 7
- Bug #91144Copying records in pid 0 is not possible anymore
- Bug #91851Page module translation wizard shows duplicate records if in workspace
- Bug #91943Workspace preview shows correct items for sub menus
- Task #96279Remove v9->v10 upgrade wizards
- Task #98475Avoid negative pid's in SQL schema
- Bug #91881Massive load when deleting sys_workspace record on pid 0
- Bug #89122Inconsistent evaluation of pid=-1 with workspace records