Repository navigation
[BUGFIX] Version prompt fragments in workspaces - #47
Conversation
|
i think |
|
Hey @dgorges, thank you! I pushed two follow-up commits.
Additionally, @achimfritz removing |
63b3c80 to
8bc95d3
Compare
With versioningWS_alwaysAllowLiveEdit gone, workspace versions of tx_aim_prompt_fragment and tx_aim_page_prompt_fragment exist on every supported TYPO3 version. PagePromptResolver now reads live records plus the ones created in the current workspace and drops hidden rows only after the workspace overlay, so an assignment activated, deactivated or created in a workspace resolves the way that workspace sees it. The assignment listing, the auto-detected fragment lookup, the assignment counts and the aim:calibrateVoice upsert read live records only, so they no longer return workspace versions or update one directly. Signed-off-by: Oliver Bartsch <bo@cedev.de>
PagePromptFragmentRepository read live records only, so the Prompt Management module and PromptManagementApi hid what a backend user had changed in their workspace. Reads now follow the workspace of the current Context. Assignments, the auto-detected fragment, the assignment counts, the page summary and the library usage see edits, activations, deactivations, deletions, moves and records created in that workspace. The paginated Pages and Library listings filter, sort and count live records plus the ones created in the workspace, like the core Records module, and overlay the rows they return. The auto-detected fragment upsert writes live without DataHandler and keeps reading live records only. Signed-off-by: Oliver Bartsch <bo@cedev.de>
The auto-detected fragment upsert counted only live assignments as sharing the fragment. An assignment created or edited in a workspace that reuses it was missed, so a re-run rewrote the fragment in place and that page carried the new text unreviewed once published. Rows of every workspace now count, except versions of the upserted assignment itself. The Library listing selected move pointers next to their live rows, so a fragment moved in a workspace was counted twice and could be counted without being listed. It now reads live and new rows only and lets the overlay apply the move. PagePromptResolver sorted assignments before the workspace overlay, so a reorder in a workspace did not change the composed prompt. It sorts the overlaid rows now. The upsert keeps writing live. Its docblock and the one of PromptManagementApi::saveAutoDetectedFragment() say that a workspace version of the fragment replaces that write once published. Signed-off-by: Oliver Bartsch <bo@cedev.de>
upsertAutoDetectedFragment() writes live without DataHandler. With both tables versioned, a call from within a workspace changed the live tone of voice without review. It now throws there; the CLI runs live and is unaffected. When the upsert detaches the fragment, a pending workspace version of the assignment that still points at the old fragment follows the detach, so publishing it no longer points the live assignment back. The Pages and Library listings leave out records deleted in the workspace before counting and paginating, so totals match the rows shown. countAllAssignments() counts in live and reads only the columns it needs within a workspace. Signed-off-by: Oliver Bartsch <bo@cedev.de>
The page filter of the Library listing read the assignments of the current workspace without leaving out the ones deleted there, so a fragment whose only assignment on the selected page was deleted in the workspace was still listed and counted. excludeDeletedInWorkspace() now uses integer literals, so it also applies to that subquery. The docblocks and the changelog no longer claim that publishing a workspace version of the fragment replaces what the upsert wrote after it detached the assignment into a new fragment. Signed-off-by: Oliver Bartsch <bo@cedev.de>
8bc95d3 to
5bc6a89
Compare
PagePromptFragmentRepository overlaid every row on its own with versionOL(), one query per row, and sorted the result in PHP. It now resolves the uids of a workspace through PlainDataResolver and reads the resolved rows in one query, sorted in SQL, so a read costs the same few queries however many rows it returns. countAllAssignments() loaded the whole assignment table within a workspace to count it. It counts in SQL now, each assignment once by its version in that workspace, without the ones deleted there. PagePromptResolver overlays with bypassEnableFieldsCheck, since it checks hidden itself afterwards, which saves a query per row on 12.4 and 13.4. A functional test now edits and deletes through DataHandler within a workspace and checks that live stays untouched and that the Prompt Management reads see the workspace only there. It replaces the unit test that checked the TCA keys. PlainDataResolver resolves nothing and DataHandler versions nothing without EXT:workspaces, so it is a dev dependency now and part of the 12.4 and 13.4 CI legs. Signed-off-by: Oliver Bartsch <bo@cedev.de>
No description provided.