Closed (fixed)
Project:
Examples for Developers
Version:
8.x-1.x-dev
Component:
Node Type Example
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2016 at 14:45 UTC
Updated:
20 Jan 2017 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
toddtomlinson commentedNote: I'm running Drupal 8.3 when testing this. I started with a fresh install on 8.1.x and had the same problem though.
Comment #3
mile23Thanks for filing the issue!
I think rebuilding the YAML files according to the instructions will be good enough. If it's not it will be interesting to find out what is.
Comment #4
jeevanbhushetty commentedWorking on it..
Comment #5
jeevanbhushetty commentedconfiguration file for default view mode was missing, added for both the content types.
While fixing this issue found another issue which will be fixed as a part of #2841250: On Uninstallling node_type_example configurations are not deleted, which leads to an error while re-enabling the module.
Comment #6
ajitsAs a standard, we use 2 space indentation in the yml files. Otherwise, looks okay :)
Comment #7
jeevanbhushetty commentedThanks @Ajit updating indents.
Comment #8
jeevanbhushetty commentedUpdated the patch, as it will affect whole patch so not adding interdiff :)
Comment #9
ajitsThank you!
Comment #10
mile23Thanks.
We need a test that goes through the repo steps listed above.
Also, it looks like the patch adds new yaml but doesn't remove any old files. So are all the files necessary, or just the new ones?
Comment #11
jeevanbhushetty commentedHi @Mile, We need all YAML files, entity view mode YAML was missing added it.
Will add test for the steps in repo.
Comment #12
jeevanbhushetty commentedAdded test as well.
Comment #13
gg24 commentedPatch works as intended.
Comment #14
gg24 commentedThis is my observation, correct me if i am wrong that if the module is already enabled and we apply the patch. This doesn't update the existing configurations.
Comment #15
jeevanbhushetty commentedHi @gg24, As per my understanding whenever you update config or create new config you have to re-install the module to apply the new config. Simply applying patch won't work.
Steps to Test:
1. Disable the module
2. Apply the Path
3. Delete the config of module from config file (this is the issue of module which will be fixed in #2841250: On Uninstallling node_type_example configurations are not deleted, which leads to an error while re-enabling the module)
4. Enable the module
5. Test as per repo and added test case.
Comment #16
gg24 commented@jeevanbhushetty we can go for a better way for doing this, like adding a hook_update_N, you can refer here for more ideas: https://www.drupal.org/docs/8/api/update-api/updating-configuration-in-d...
Comment #17
gg24 commentedAs this module is Dev Release. It won't require any update hook. Changing Status to RTBC.
Comment #18
jeevanbhushetty commentedAdd support to delete configuration from config table on uninstalling the module.
Issue of module uninstallation for older YAML files are solved in #2733739: Node Type Example fails to reinstall
Comment #20
mile23Yah, we *don't* want hook_update_n() because we're only demonstrating that you can set up a content type as a yaml file.
Also, even though the test doesn't have all the steps of the repro instructions, it does demonstrate that the body field shows on the node default view, so we're OK as far as regressing this issue.
We should only give the permissions we expect to need, which in this case would be 'create [type] content'. Changed on commit.
Random names are somewhat harmful and can lead to intermittent failures, unless we're specifically testing for edge cases in field content. Let's just use a static string. Changed on commit.
Thanks folks!