Bug #93352
closedContent is not fetched during workspace preview
0%
Description
Steps to reproduce:
- Create a new page within a workspace
- Add content on that page, within the workspace
- Generate preview link from workspace module
- Open the url
I don't see any content, but there should be content. The page itself is rendered.
Looks like a query is generated in the wrong way. The generated query in my case looks like this:
SELECT "uid" FROM "pages" WHERE ("uid" IN (93)) AND (("pages"."deleted" = 0) AND ("pages"."t3ver_oid" = 0) AND ("pages"."starttime" <= 1611340200) AND (("pages"."endtime" = 0) OR ("pages"."endtime" > 1611340200)) AND (("pages"."fe_group" IS NULL) OR ("pages"."fe_group" = '') OR ("pages"."fe_group" = '0') OR (instr(','||"pages"."fe_group"||',', ',0,')) OR (instr(','||"pages"."fe_group"||',', ',-1,'))) AND ("pages"."doktype" NOT IN (255)))
Page uid 93 is the one within the workspace, 92 the one outside of the workspace. That query returns 0 results, because t3ver_oid of page uid 93 is set to 92.
During my debugging I found that the following code is executed, in order to create a broken query:
- ContentContentObject
- ContentObjectRenderer->getRecords()
- ContentObjectRenderer->exec_getQuery()
- ContentObjectRenderer->getQuery()
- ContentObjectRenderer->getQueryConstraints()
# The line: $listArr = GeneralUtility::intExplode(',', str_replace('this', (string)$tsfe->contentPid, $conf['pidInList']));
$tsfe->contentPid is 93, which leads to the broken query further down the rabbit hole.in ContentObjectRenderer->checkPidArray()
Updated by Daniel Siepmann almost 4 years ago
I just found out, the actual preview (when previewing from backend) adds the id parameter to the URL.
I just gave it a shot and adding the id parameter with 92 to the preview link as well fixed the broken rendering.
Not sure if that's the actual fix. If so, it should be pretty easy to fix, and I could give it a try.
Updated by Daniel Siepmann over 3 years ago
- Has duplicate Bug #93650: Workspace Page Version shows no content when page was versionized added
Updated by Daniel Siepmann over 3 years ago
- Status changed from New to Closed
- Assignee set to Daniel Siepmann