"Promoted to front page" for new content types should default to Un-Checked

Created on 2 December 2010, over 14 years ago
Updated 19 March 2025, about 2 months ago

Problem/Motivation

When creating a new content type, the default value for the "Promoted to front page" checkbox should be FALSE.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->

So this normal task is allowed in the drupal 8 beta since it is a prioritized usability improvement with no/very little disruption.

Proposed resolution

Write patch to Drupal 8 to change this behavior for new version of Drupal

Remaining tasks

Most recent patch failed testing, need to be fixed and resubmitted

<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->
๐Ÿ“Œ Task
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component

node system

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States jenlampton

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    This issue still seems relevant, I'm surprised this default comes all the way from Node's field default value.

    We'll need to start with a reroll of the changes onto an MR.

    I also noticed that we have base_field_override config in the standard install profile that says the default value of this should be 0 but that doesn't seem to actually be used on install.

  • First commit to issue fork.
  • Pipeline finished with Failed
    about 2 months ago
    Total: 675s
    #456701
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada xmacinfo Canada

    Based on #29338: Hide Promoted/Sticky fields by default in Form display โ†’ , we should be marking this ticket as โ€œOutdatedโ€ or โ€œDuplicateโ€.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    @xmacinfo no - this is different. This is making the checkbox on the NodeType form itself to be unchecked.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada xmacinfo Canada

    Yes, but if we remove the checkboxes on new install, we do not need to worry about the checkbox being unchecked.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 182s
    #467052
  • Pipeline finished with Failed
    about 1 month ago
    Total: 457s
    #467054
  • Pipeline finished with Success
    about 1 month ago
    Total: 898s
    #467062
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    CR created https://www.drupal.org/node/3517642 โ†’

    We need an upgrade path here though unfortunately.

    Currently if you:
    1. Install Standard profile on 11.x
    2. Check out this branch
    3. Clear cache
    4. Notice the Article node type no longer defaults to Promoted. Page correctly still defaults to Not Promoted because Standard ships with base_field_override config

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Yes, but if we remove the checkboxes on new install, we do not need to worry about the checkbox being unchecked.

    We aren't removing checkboxes, we're hiding them. It actually makes more sense to default to unchecked once we hide the fields, otherwise new sites will be creating "promoted" content without the checkbox even being visible. We have to do things in small steps (see the history of this issue) otherwise we'll never get anywhere :) Just look at how many tests in core assume things are promoted by default!

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Added a basic upgrade path, needs tests though.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 461s
    #467094
  • Pipeline finished with Failed
    about 1 month ago
    Total: 667s
    #467104
  • Pipeline finished with Success
    about 1 month ago
    Total: 3566s
    #467864
  • Pipeline finished with Failed
    about 1 month ago
    Total: 175s
    #468837
  • Pipeline finished with Success
    about 1 month ago
    Total: 575s
    #468840
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States dcam

    I added an update path test.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    So I tested it out and pretty basic, creating a new content type and the promoted to front checkbox is unchecked

    Hiding old patches
    Tweaked the CR just slightly with an image for the visual people out there.

    I imagine this may break some contrib tests (hopefully not a lot) but seems like a right step.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States benjifisher Boston area

    We discussed this issue briefly at ๐Ÿ“Œ Drupal Usability Meeting 2025-04-11 Active . That issue will have a link to a recording of the meeting. We were primarily discussing the related issue #29338: Hide Promoted/Sticky fields by default in Form display โ†’ .

    We agree that this is a good idea. Thanks for working on this issue!

    For the record, the attendees at the usability meeting were benjifisher, rkoller, and simohell.

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia poker10

    There is still one @todo in the MR - do we need to discuss that? I do not see it mentioned anywhere in this issue. Thanks!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Yea I think we probably do need to batch it. Know it's not likely but I have worked with sites that had 100s of content types

  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia mohit_aghera Rajkot

    Updated code to use the config updater service.
    There were unrelated functional javascript test failures. Triggered the job again.

  • Pipeline finished with Success
    14 days ago
    Total: 6073s
    #486586
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Believe that was the last outstanding question.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada xmacinfo Canada

    Thank you everyone!

    Can we do a clean-up of the Issue tags? I think some of the tags are not relevant anymore.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States benjifisher Boston area

    The CI tests passed, but just because the "Validatable config" test is allowed to fail.

    TL;DR: I think it is worth looking at that test, but I think it is OK for it to fail for this issue.

    I am not familiar with that test, but it seems to compare the results of

    vendor/bin/drush config:inspect --statistics
    

    on the target branch (11.x) and on the feature branch.

    On the target branch, the installs drush and the config_inspector module. Then it installs the Standard profile and enables all core modules (except sdc, which is obsolete) and config_inspector. On the feature branch, the test first applies database updates.

    The test fails if any of the statistics are lower on the feature branch than they are on the target branch.

    I went through similar steps, but instead of vendor/bin/drush config:inspect --statistics, I exported configuration. The only difference between the two branches is that the feature branch includes core.base_field_override.node.article.promote.yml. It looks as though this config entity is not fully validatable: the schema is in core/config/schema/core.data_types.schema.yml, and it is not marked as FullyValidatable: ~. So it makes sense that the statistics go down and the test fails.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Re #225 yes this is expected since we're adding new config.

  • The Needs Review Queue Bot โ†’ tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide โ†’ to find step-by-step guides for working with issues.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Rebased

  • Pipeline finished with Failed
    4 days ago
    Total: 183s
    #493840
  • Pipeline finished with Failed
    4 days ago
    Total: 1154s
    #493842
Production build 0.71.5 2024