Visibility

In the frontend the core hides records that are hidden, outside their starttime and endtime, or restricted to other user groups, and applies the same rules to translations and to related records. Each scenario below reads the same records once the way the core does in the frontend, with its restriction container and PageRepository, and once through an Extbase repository with the same context, and compares the returned records.

Provenance

Tests ran on main (15.0-dev), which is assumed to behave as TYPO3 14.3.

Summary

12 scenarios, by Extbase status:

Comparison

ScenarioCoreExtbase
Hidden notices are not read The core does not show hidden records in the frontend. Of the notices on the storage page 2 it returns the visible notice (1) and not the hidden notice (2). Same as coreExtbase returns the visible notice (1) of the storage page 2 and not the hidden notice (2), like the core.
Notices before their starttime are not read At the time 1700000000 the core does not show records whose starttime lies in the future. Of the notices on the storage page 3 it returns the notice with a starttime in the past (3) and the notice without starttime (5), but not the notice that starts later (4). Same as coreExtbase returns the notice with a starttime in the past (3) and the notice without starttime (5) and not the notice that starts later (4), like the core.
Notices after their endtime are not read At the time 1700000000 the core does not show records whose endtime lies in the past. Of the notices on the storage page 4 it returns the notice that ends later (6) and the notice without endtime (8), but not the notice that has ended (7). Same as coreExtbase returns the notice that ends later (6) and the notice without endtime (8) and not the notice that has ended (7), like the core.
Notices for another user group are not read A visitor who is a member of the user group 1 gets the records without restriction and the records for group 1 from the core. Of the notices on the storage page 5 it returns the public notice (9), the notice for group 1 (10) and the notice for the groups 1 and 2 (12), but not the notice for group 2 only (11). Same as coreExtbase returns the public notice (9), the notice for group 1 (10) and the notice for the groups 1 and 2 (12) to a member of group 1, and not the notice for group 2 only (11), like the core.
A hidden translation hides the notice with overlays on Read with German and overlays on, the core shows a record only if its translation is visible. Notice 13 has a hidden German translation (14), so it is dropped from the result: the overlay finds no translation. Notice 15 has a visible German translation (16) and is returned with its German title. Same as coreRead with German and overlays on, Extbase returns only notice 15 with its German title, like the core. Notice 13 is dropped because its German translation (14) is hidden.
A hidden translation keeps the default title with overlays mixed Read with German and overlays mixed, the core keeps a record in the default language if its translation is not visible. Notice 13, whose German translation (14) is hidden, is returned with its English title; notice 15 is returned with its German title. Same as coreRead with German and overlays mixed, Extbase returns notice 13 with its English title and notice 15 with its German title, like the core.
Hidden keywords of a notice are not read Hidden records of an MM relation are not shown in the frontend. The core joins the relation table to the keyword table with the FrontendRestrictionContainer, which restricts the keyword table, and reads the keywords of notice 17 in the order of the relation: it returns the visible keyword (1) and not the hidden keyword (2). Same as coreExtbase returns the visible keyword (1) of notice 17 and not the hidden keyword (2), like the core.
Hidden comments of a notice are not read Hidden inline children are not shown in the frontend. The core reads the comments of notice 17 from the comment table by the field "notice" that points to the parent, with the FrontendRestrictionContainer: it returns the visible comment (1) and not the hidden comment (2). Same as coreExtbase returns the visible comment (1) of notice 17 and not the hidden comment (2), like the core.
Ignoring the hidden flag keeps the user group restriction Without the hidden restriction the core still applies the restriction for user groups. For a visitor without user group it returns the public notice (18) and the hidden public notice (19) from the storage page 8, but not the notice for group 1 (21) and not the hidden notice for group 1 (20). Same as coreWith ignoreEnableFields and only the enable field "disabled" to be ignored, Extbase returns the public notice (18) and the hidden public notice (19) and still drops the notices for group 1 (20, 21), like the core.
A constraint on a hidden keyword finds no notice Notices are found by the name of a keyword of the MM relation. The core joins the notice table over the relation table to the keyword table with the FrontendRestrictionContainer, which restricts both the notice and the keyword table, and reads the notices of the storage page 7 whose keyword is named "Hidden keyword". The keyword is hidden, so the join finds nothing and the result is empty. Same as coreExtbase finds no notice for a constraint on the name "Hidden keyword" of the keywords, like the core: the join to the keyword table is restricted by the enable fields and the keyword is hidden.
A constraint on a hidden keyword finds the notice when the hidden flag is ignored With the hidden restriction removed from the FrontendRestrictionContainer, which removes it for the notice table and the keyword table, the core finds notice 17 for the keyword named "Hidden keyword": the keyword is no longer excluded from the join. Same as coreWith ignoreEnableFields and only the enable field "disabled" to be ignored, Extbase finds notice 17 for a constraint on the name "Hidden keyword" of the keywords, like the core: the hidden keyword is not excluded from the join.
Ignoring all enable fields also ignores the user group restriction Without the hidden, starttime, endtime and user group restriction, only the deleted restriction is left. The core returns all four notices of the storage page 8 to a visitor without user group: the public notice (18), the hidden public notice (19), the hidden notice for group 1 (20) and the notice for group 1 (21). Same as coreWith ignoreEnableFields and an empty list of enable fields to be ignored, Extbase returns the same four notices of the storage page 8 as the core to a visitor without user group: 18, 19, 20 and 21. The user group restriction is dropped together with the others.

Scenarios

Hidden notices are not read

Same as core

In 14.3

Core: The core does not show hidden records in the frontend. Of the notices on the storage page 2 it returns the visible notice (1) and not the hidden notice (2).

Extbase: Extbase returns the visible notice (1) of the storage page 2 and not the hidden notice (2), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:99 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:114 (Extbase) (local)

Notices before their starttime are not read

Same as core

In 14.3

Core: At the time 1700000000 the core does not show records whose starttime lies in the future. Of the notices on the storage page 3 it returns the notice with a starttime in the past (3) and the notice without starttime (5), but not the notice that starts later (4).

Extbase: Extbase returns the notice with a starttime in the past (3) and the notice without starttime (5) and not the notice that starts later (4), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:129 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:144 (Extbase) (local)

Notices after their endtime are not read

Same as core

In 14.3

Core: At the time 1700000000 the core does not show records whose endtime lies in the past. Of the notices on the storage page 4 it returns the notice that ends later (6) and the notice without endtime (8), but not the notice that has ended (7).

Extbase: Extbase returns the notice that ends later (6) and the notice without endtime (8) and not the notice that has ended (7), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:159 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:174 (Extbase) (local)

Notices for another user group are not read

Same as core

In 14.3

Core: A visitor who is a member of the user group 1 gets the records without restriction and the records for group 1 from the core. Of the notices on the storage page 5 it returns the public notice (9), the notice for group 1 (10) and the notice for the groups 1 and 2 (12), but not the notice for group 2 only (11).

Extbase: Extbase returns the public notice (9), the notice for group 1 (10) and the notice for the groups 1 and 2 (12) to a member of group 1, and not the notice for group 2 only (11), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:189 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:205 (Extbase) (local)

A hidden translation hides the notice with overlays on

Same as core

In 14.3

Core: Read with German and overlays on, the core shows a record only if its translation is visible. Notice 13 has a hidden German translation (14), so it is dropped from the result: the overlay finds no translation. Notice 15 has a visible German translation (16) and is returned with its German title.

Extbase: Read with German and overlays on, Extbase returns only notice 15 with its German title, like the core. Notice 13 is dropped because its German translation (14) is hidden.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:221 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:236 (Extbase) (local)

A hidden translation keeps the default title with overlays mixed

Same as core

In 14.3

Core: Read with German and overlays mixed, the core keeps a record in the default language if its translation is not visible. Notice 13, whose German translation (14) is hidden, is returned with its English title; notice 15 is returned with its German title.

Extbase: Read with German and overlays mixed, Extbase returns notice 13 with its English title and notice 15 with its German title, like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:251 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:266 (Extbase) (local)

Hidden keywords of a notice are not read

Same as core

In 14.3

Core: Hidden records of an MM relation are not shown in the frontend. The core joins the relation table to the keyword table with the FrontendRestrictionContainer, which restricts the keyword table, and reads the keywords of notice 17 in the order of the relation: it returns the visible keyword (1) and not the hidden keyword (2).

Extbase: Extbase returns the visible keyword (1) of notice 17 and not the hidden keyword (2), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:281 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:306 (Extbase) (local)

Hidden comments of a notice are not read

Same as core

In 14.3

Core: Hidden inline children are not shown in the frontend. The core reads the comments of notice 17 from the comment table by the field "notice" that points to the parent, with the FrontendRestrictionContainer: it returns the visible comment (1) and not the hidden comment (2).

Extbase: Extbase returns the visible comment (1) of notice 17 and not the hidden comment (2), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:322 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:346 (Extbase) (local)

Ignoring the hidden flag keeps the user group restriction

Same as core

In 14.3

Core: Without the hidden restriction the core still applies the restriction for user groups. For a visitor without user group it returns the public notice (18) and the hidden public notice (19) from the storage page 8, but not the notice for group 1 (21) and not the hidden notice for group 1 (20).

Extbase: With ignoreEnableFields and only the enable field "disabled" to be ignored, Extbase returns the public notice (18) and the hidden public notice (19) and still drops the notices for group 1 (20, 21), like the core.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:362 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:377 (Extbase) (local)

A constraint on a hidden keyword finds no notice

Same as core

In 14.3

Core: Notices are found by the name of a keyword of the MM relation. The core joins the notice table over the relation table to the keyword table with the FrontendRestrictionContainer, which restricts both the notice and the keyword table, and reads the notices of the storage page 7 whose keyword is named "Hidden keyword". The keyword is hidden, so the join finds nothing and the result is empty.

Extbase: Extbase finds no notice for a constraint on the name "Hidden keyword" of the keywords, like the core: the join to the keyword table is restricted by the enable fields and the keyword is hidden.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:392 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:407 (Extbase) (local)

A constraint on a hidden keyword finds the notice when the hidden flag is ignored

Same as core

In 14.3

Core: With the hidden restriction removed from the FrontendRestrictionContainer, which removes it for the notice table and the keyword table, the core finds notice 17 for the keyword named "Hidden keyword": the keyword is no longer excluded from the join.

Extbase: With ignoreEnableFields and only the enable field "disabled" to be ignored, Extbase finds notice 17 for a constraint on the name "Hidden keyword" of the keywords, like the core: the hidden keyword is not excluded from the join.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:422 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:437 (Extbase) (local)

Ignoring all enable fields also ignores the user group restriction

Same as core

In 14.3

Core: Without the hidden, starttime, endtime and user group restriction, only the deleted restriction is left. The core returns all four notices of the storage page 8 to a visitor without user group: the public notice (18), the hidden public notice (19), the hidden notice for group 1 (20) and the notice for group 1 (21).

Extbase: With ignoreEnableFields and an empty list of enable fields to be ignored, Extbase returns the same four notices of the storage page 8 as the core to a visitor without user group: 18, 19, 20 and 21. The user group restriction is dropped together with the others.

Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:452 (Core) (local)
Testtypo3/sysext/extbase/Tests/Functional/Persistence/Facts/VisibilityTest.php:472 (Extbase) (local)