Bug #93352

Content is not fetched during workspace preview

Added by Daniel Siepmann about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2021-01-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Steps to reproduce:

  1. Create a new page within a workspace
  2. Add content on that page, within the workspace
  3. Generate preview link from workspace module
  4. 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:

  1. ContentContentObject
  2. ContentObjectRenderer->getRecords()
  3. ContentObjectRenderer->exec_getQuery()
  4. ContentObjectRenderer->getQuery()
  5. 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()

#1

Updated by Daniel Siepmann about 1 month 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.

Also available in: Atom PDF