Problem/Motivation

  1. Install Standard.
  2. drush cex -y
  3. Navigate to the config sync directory and initialize a git repository:
    git init && git add . && git commit -am "Initial Standard install."
    
  4. Visit /admin/structure/types/manage/article/display and save the form without making any changes.
  5. Visit /admin/structure/types/manage/article/form-display and save the form without making any changes.
  6. drush cex -y
  7. Do a git diff in the config sync folder. You will see:
    diff --git a/sync/core.entity_form_display.node.article.default.yml b/sync/core.entity_form_display.node.article.default.yml
    index 6f17525..9d351cb 100644
    --- a/sync/core.entity_form_display.node.article.default.yml
    +++ b/sync/core.entity_form_display.node.article.default.yml
    @@ -54,7 +54,10 @@ content:
         type: entity_reference_autocomplete_tags
         weight: 3
         region: content
    -    settings: {  }
    +    settings:
    +      match_operator: CONTAINS
    +      size: 60
    +      placeholder: ''
         third_party_settings: {  }
       path:
         type: path
    diff --git a/sync/core.entity_view_display.node.article.default.yml b/sync/core.entity_view_display.node.article.default.yml
    index 0d21c3d..c784799 100644
    --- a/sync/core.entity_view_display.node.article.default.yml
    +++ b/sync/core.entity_view_display.node.article.default.yml
    @@ -58,6 +58,6 @@ content:
       links:
         weight: 100
         region: content
    -hidden:
    -  field_image: true
    -  field_tags: true
    +    settings: {  }
    +    third_party_settings: {  }
    +hidden: {  }
    

This happens on 8.3.x, 8.2.x, and even 8.1.x, so it is unrelated to #2843074: Stale dependencies passed to onDependencyRemoval() result in data loss on uninstallation or #2796581: Fields must store their region in entity displays.

Proposed resolution

  • Figure out why there are supposedly hidden fields disappearing from the hidden field list.
  • Probably just re-export the default config with the current valid config.

Remaining tasks

  1. Use git blame to figure out why the tags and image fields are listed both as displayed and hidden, and see if there was any bug.
  2. Create a patch that re-exports any entity view and form displays that have such a mismatch. (Check modules other than Node as well, just in case.)
  3. Review. Check that the current behavior is still as described above. Apply the patch, reinstall Drupal, and check that there are no changes in stored config after saving the form and view modes.

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm created an issue. See original summary.

xjm’s picture

Component: configuration entity system » node system

I guess this is probably Node's problem, assuming the default config is just stale and there's not any actual functional bug.

xjm’s picture

Issue summary: View changes
Issue tags: +Novice

A novice could probably work on this issue. The tasks are:

  1. Use git blame to figure out why the tags and image fields are listed both as displayed and hidden, and see if there was any bug.
  2. Create a patch that re-exports any entity view and form displays that have such a mismatch. (Check modules other than Node as well, just in case.)

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

_Archy_’s picture

Issue tags: -Novice +Novice DCTransylvania
_Archy_’s picture

Issue tags: -Novice DCTransylvania +Novice, +DCTransylvania

Tagging went wrong :D

benjifisher’s picture

Issue tags: +Baltimore2017
gerzenstl’s picture

Assigned: Unassigned » gerzenstl
lokapujya’s picture

#2321385: Creation of node body field in postSave() incompatible with default config and overrides is the issue that adds:

hidden:
  field_image: true
  field_tags: true
lokapujya’s picture

Status: Active » Needs review
FileSize
600 bytes

Use the generated config.

John Cook’s picture

Issue summary: View changes

I've tested the patch in #10.

While it does fix the problem with core.entity_view_display.node.article.default.yml, there is still a problem with core.entity_form_display.node.article.default.yml having different configuration so unfortunately back to needs work.

I've updated the reproduction instructions to include re-saving the form display and merged together the two file diffs so it doesn't get missed.

John Cook’s picture

Assigned: gerzenstl » Unassigned
Status: Needs review » Needs work
gerzenstl’s picture

Sorry, I didn't added what I have found so far over last days.

Following @xjm suggested steps, a git blame on core.entity_view_display.node.article.default.yml shows that field_image and field_tags where set as hidden on the issue #2321385: Creation of node body field in postSave() incompatible with default config and overrides.

I couldn't find a good reason of why those fields were set as hidden.

John Cook: The issue it's not only with core.entity_view_display.node.article.default.yml and core.entity_form_display.node.article.default.yml. I was able to reproduce same issue with the rest of the Article content type view modes ("teaser" or "rss") and with Basic page content type.

I can quickly prepare a patch to match the config differences.

But what I'm trying to find out is why on step 4

Visit /admin/structure/types/manage/article/display and save the form without making any changes.

doesn't place those 2 fields on the "hidden" group the first time the form renders.

gerzenstl’s picture

Assigned: Unassigned » gerzenstl
vegantriathlete’s picture

Assigned: gerzenstl » Unassigned
Issue tags: +dcco2017

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

michaellenahan’s picture

Version: 8.4.x-dev » 8.5.x-dev
Issue tags: +Vienna2017
gmario’s picture

In DrupalCon Vienna - i'm working on this.

Ivan Berezhnov’s picture

Issue tags: +CSKyiv18
chera.jaswinder’s picture

Assigned: Unassigned » chera.jaswinder
vegantriathlete’s picture

Issue tags: -dcco2017
Chirag_Garg’s picture

Chirag_Garg’s picture

Hi Team,

Can you verify the patch for the mentioned issue.

benjifisher’s picture

Issue summary: View changes
Status: Needs work » Needs review

First, let's set to NR so that we get a "review" from the testbot.

Normally, we like to see an interdiff to help compare your patch to the previous one on this issue. In this case, I think we can skip that since the patches are so simple. (The patch in #10 has one hunk. The patch in #23 includes that hunk and one additional hunk.)

Comment #10 explains where the inconsistency in the view mode crept in. Can we do the same for the inconsistency in the form mode, as requested in the issue summary?

The issue summary asks for checks on other modules (not just the Node module). I am not sure what we mean by this. We could save config for Basic page as well as Article. Surely we do not want to save every config form that Drupal provides and check that the config is stable as part of this Novice issue.

I think that reviewing this is still a novice task. I will make this explicit in the issue summary.

snehi’s picture

Status: Needs review » Reviewed & tested by the community

I think testbots are passing it and not able to reproduce as it of now.
Marking it for RTBC, having an issue. Please feel free to mark it as Need works.

benjifisher’s picture

Status: Reviewed & tested by the community » Needs review

I am moving this back to NR because "not able to reproduce as it of now" is not enough of a review.

@snehi, please describe the steps you followed in the same level of detail as the issue summary. Do you get different results with and without the patch?

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

lmirabile’s picture

Everything works well: I installed 8.6.0, followed the steps above and reproduced the issues exactly as described. I then installed the patch, dropped the database, reinstalled Drupal, and followed the exact steps above. I got no differences when I did a git diff.

lmirabile’s picture

Status: Needs review » Reviewed & tested by the community
benjifisher’s picture

Assigned: Chirag_Garg » Unassigned
lmirabile’s picture

  • catch committed dc03979 on 8.6.x
    Issue #2843707 by Chirag_Garg, lokapujya, xjm, gerzenstl: Default config...
catch’s picture

Version: 8.6.x-dev » 8.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.6.x and cherry-picked to 8.5.x. Thanks!

  • catch committed 1b40c7c on 8.5.x
    Issue #2843707 by Chirag_Garg, lokapujya, xjm, gerzenstl: Default config...

Status: Fixed » Closed (fixed)

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

rosinegrean’s picture

Issue tags: -DCTransylvania
aadeshvermaster@gmail.com’s picture

I did not get this issue with drupal 8.5.3. I have followed these steps with using PHP 7.2.5-1, mysql - 5.7.22, and Drupal 8.5.3. Currently, There is no contents of Article Content type. i will try with some article content.

aadeshvermaster@gmail.com’s picture

I have also tried these steps after adding 2 article contents and not getting any difference using drupal 8.5.3. Now, i will tried with lower versions drupal 8.3.x.

lokapujya’s picture

Was there another issue to test for mismatches?