Bug #81566

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

Added by Alex Kellner 4 months ago. Updated 4 days ago.

Status:
Closed
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 4 months ago

  • Status changed from New to Accepted

Confirmed

#2 Updated by Wolfgang Klinger 3 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 days ago

  • Status changed from Accepted to Closed

The documentation has been updated, therefore I close this issue for now; please look at:

https://docs.typo3.org/typo3cms/TSconfigReference/UserTsconfig/TopLevelObjects/Index.html?highlight=tcadefaults

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.

Also available in: Atom PDF