Project

General

Profile

Actions

Story #97780

open

Hide/disable sysfolder does not hide containg records

Added by Philipp Idler almost 2 years ago. Updated almost 2 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2022-06-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Sprint Focus:

Description

I'm a TYPO3 developer for a while now and I'm quite confused about the fact that records are still visible in frontend if an editor disables the sysfolder.
As an editor I would expect to hide all content in frontend by disabling the concerning sysfolder.

I thought this action would be the shorthand version of disabling/hiding each records one by one.
If not, I have no clue how to disable thousands of records by hand in short as an editor. Using the clipboard in paginated list module is not an option in my opinion.

Extbase's persistentmanager fails to check where the records are stored and if the storage (the sysfolder) is disabled or access protected.

Actions #1

Updated by Tomas Norre Mikkelsen almost 2 years ago

I might understand you wrong, but I have a question back to you.

Let us say you have a sys-folder like the following:

  • Sys-folder
    • News Record 1 (Active)
    • News Record 2 (Hidden)

When you then click hide on the sys-folder, it would be like this: (from how I understand you)

  • Sys-folder (hidden)
    • News Record 1 (hidden)
    • News Record 2 (Hidden)

What should then happen when I activate the sys-folder again? Should all in the sys-folder then be active? Then you are reaching a state that you didn't have before, hiding it.

Actions #2

Updated by Philipp Idler almost 2 years ago

You misunderstood. Disabling a sysfolder should not disable all containing records via backend but should hide them in frontend.
In my opinion the sysfolder's state (enabled or disabled) should be taken in account when performing queries on records.

Currently an SQL query performed by extbase with common enabledFields and storagePid looks kind of like this:

SELECT tx_extkey_somerecord .* FROM tx_extkey_somerecord WHERE tx_extkey_somerecord.pid=STORAGE-PID AND tx_extkey_somerecord.deleted=0 AND tx_extkey_somerecord.hidden=0;

As you see, there are no checks included to query the current sysfolder's state.
So it should be changed to something like this:

SELECT tx_extkey_somerecord.* FROM tx_extkey_somerecord LEFT JOIN pages ON pages.uid=tx_extkey_somerecord.pid WHERE tx_extkey_somerecord.pid=STORAGE-PID AND tx_extkey_somerecord.deleted=0 AND tx_extkey_somerecord.hidden=0 AND pages.deleted=0 AND pages.hidden=0;
Actions #3

Updated by Philipp Idler almost 2 years ago

  • Tracker changed from Bug to Story
Actions #4

Updated by Georg Ringer almost 2 years ago

I agree that the current behaviour is somehow unexpected. Either the checkbox hidden must be removed from sys_folders or it must fulfill a reasion. I agree that all records which are below a hidden sys_folder should be removed in the FE rendering.

However there are also multiple questions to be answered:

  • Is it worth this totally breaking behaviour (imo yes)
  • What about recursions like Hidden Sysfolder/Non Hidden Sysfolder/A Record. Should this be hidden as well?
  • What about Menus: I guess those should be hidden as well?
  • What about the admin panel feature "show hidden records": Should that respect such stuff too?
  • What about the content element "shortcut" or TypoScript cObj "RECORDS" which renders a content element being on a hidden page?
  • What about the content element "shortcut" or TypoScript cObj "RECORDS" which renders a content element being on a non hidden page but its parent page is hidden?
Actions #5

Updated by Georg Ringer almost 2 years ago

  • Status changed from New to Accepted
Actions #6

Updated by Philipp Idler almost 2 years ago

Good points you brought up Georg.

I think parent sysfolders should be recognized as well. But thinking about pages, the behavoir should be the same, e.g. if you disable the rootpage the whole website would be unaccessible. Quite a big change though.

And yes, this behavior should cover all situations where TYPO3 collects records from sysfolders (or pages) in my opinion.
Not a no-brainer at all :(

Actions

Also available in: Atom PDF