Issue Bug Closed

#93352Content is not fetched during workspace preview

Daniel Siepmann 01/22/21, 18:45 updated 03/09/21, 19:47

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()

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.