Creating new pages are stored with pages.hidden=0 by default
We tried some stuff, but we're not able to create new pages in TYPO3 8.7.1 in Backend (adminstrators and editors) that are disabled by default.
While it's possible to drag and drop pages in pagetree with hidden=1, this behaviour seems to be broken when using New in context menu.
- Right-Click on a page in page tree
- Click on New
Stuff that we already tried:
page.TCAdefaults.pages.hidden = 1 TCAdefaults.pages.hidden = 1
TCAdefaults.pages.hidden = 1
#2 Updated by Wolfgang Klinger 7 months ago
That's no bug.
Simply remove 'hidden' from 'useColumnsForDefaultValues' setting in pages ctrl section.
Default is (see typo3/sysext/core/Configuration/TCA/pages.php):
'ctrl' => [ 'useColumnsForDefaultValues' => 'doktype,fe_group,hidden',
and your TCAdefaults work.
If 'hidden' is in the list, it get's overwritten with the 'neighbor' record value (see \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::setDefaultsFromNeighborRow) and as the value is set then (to '0' most of the time) it will not be overwritten again.
You could discuss this on the slack Channel (#typo3-cms-coredev), as the behaviour is not really clear. Maybe this should at least be mentioned in the documentation of tcadefaults.
#3 Updated by Riccardo De Contardi 4 months ago
- Status changed from Accepted to Closed
The documentation has been updated, therefore I close this issue for now; please look at:
Thank you for having reported the issue and many thanks to @Wolfgang Klinger for the detailed explanation.
If you think that this is the wrong decision or there is still work that should be done, please reopen it or open a new issue with a reference to this one.