Problem/Motivation

Follow up for #29338-61: Hide Promoted/Sticky fields by default in Form display. We have changed the default behavior for new content types so that the Promoted and Sticky checkboxes are hidden by default in the form display configuration (but can be un-hidden by a site builder).

Page nodes are not conceptually designed to be in a feed where they would be promoted or sticky, so it would make sense to change the default config for the page content type in Standard and Umami so that these fields are also in the hidden section of the form display.

Proposed resolution

  1. Change the default config of:
    • core/recipes/standard/recipe.yml
    • Standard's core.entity_form_display.node.page.default.yml
    • Umami's core.entity_form_display.node.page.default.yml
    • etc.
  2. Do not change the default form configuration for content that does belong in a feed, like articles, announcements, and possibly Umami recipes.
  3. Do not provide an upgrade path. This is a change to a default value for new sites only. Sites own their config once it is installed and can configure the forms for their content types however they want.

Remaining tasks

TBD

User interface changes

Form elements for "Sticky at top of lists" and "Promote to front page" no longer appear in the sidebar of every single page created in a Standard install.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

Issue fork drupal-3538654

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

berdir’s picture

My understanding would be both the standard profile and the page recipe, yes.

xjm’s picture

Issue summary: View changes

Did some work to clarify the summary, including identifying some of the relevant default config.

berdir’s picture

Status: Postponed » Active
xjm’s picture

Issue summary: View changes
acbramley’s picture

Perfect, thank you @xjm!

thejimbirch made their first commit to this issue’s fork.

thejimbirch’s picture

Status: Active » Needs review

Merge request added that hides sticky and promote in the following.

  • Page recipe
  • Standard profile Page content type
  • Umami profile Page content type
berdir’s picture

Status: Needs review » Needs work

That looks good. How about adding an assertion to \Drupal\Tests\standard\Traits\StandardTestTrait that it's visible to article and hidden for page on node/add/page and node/add/article?

Should we update the one in nightwatch_a11y_testing as well, that's also a page node type, so I assume it's been copied from standard. All other test examples are probably not worth bothering with.

thejimbirch’s picture

Issue tags: +Needs tests
acbramley’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Applied the MR and searched both recipe and profile folders for "promote" and all form_display settings minus articles (umami, standard, and nightwatch) are unchanged.

astonvictor’s picture

it works for me for all profiles
+1 RTBC

longwave’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 387e40c5594 to 11.x and eb870efd88e to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • longwave committed eb870efd on 11.3.x
    task: #3538654 Hide promote/sticky fields for page content type on new...

  • longwave committed 387e40c5 on 11.x
    task: #3538654 Hide promote/sticky fields for page content type on new...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.