Bug #81566

Creating new pages are stored with pages.hidden=0 by default

Added by Alex Kellner 2 months ago. Updated about 1 month ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-06-13
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.

How to reproduce:
  • Right-Click on a page in page tree
  • Click on New

Stuff that we already tried:

User TSConfig

page.TCAdefaults.pages.hidden = 1
TCAdefaults.pages.hidden = 1

Page TSConfig

TCAdefaults.pages.hidden = 1

History

#1 Updated by Jigal van Hemert 2 months ago

  • Status changed from New to Accepted

Confirmed

#2 Updated by Wolfgang Klinger about 1 month 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.

Also available in: Atom PDF