Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Changing a node type label does not update the entity bundle list/cache.
Proposed resolution
Add a cache clear call.
Remaining tasks
Tests. Possibly update that part of the code to use non-deprecated methods.
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#9 | 2617590-config-entity-bundle-base-update-cache-9.patch | 1.86 KB | aspilicious |
#6 | 2617590-config-entity-bundle-base-update-cache-6.patch | 1.43 KB | aspilicious |
config-entity-bundle-base-update-cache.patch | 596 bytes | Berdir | |
Comments
Comment #2
dawehnerI'm wondering whether we could provide some form of test coverage for that?
Comment #3
aspilicious CreditAttribution: aspilicious commentedJust create a page that prints all the bundles names, change the name and verify it isn't changed on that page.
Or is that to much?
Comment #4
BerdirA kernel test should work fine too, just need to change the name of a node type, save and then check getBundleInfo() and make sure it was updated.
Comment #5
aspilicious CreditAttribution: aspilicious commentedI'm going to try to add a test to the existing testbase.
Comment #6
aspilicious CreditAttribution: aspilicious commentedOr my test is incorrect or the patch doesn't work.
Comment #7
BerdirYou're mixing web requests and accessing that information within the test. There's a populated static cache that can't know that you just invalidated things in some form submission.
You need a test that saves a node type through the API or also check this over a request, not mix it.
Comment #8
aspilicious CreditAttribution: aspilicious commentedApparently I can't figure out how to get this test working
Loops in simpletest
Comment #9
aspilicious CreditAttribution: aspilicious commentedComment #11
swentel CreditAttribution: swentel commentedLooks good to me
Comment #12
alexpottLooks good to me too. Committed c41548e and pushed to 8.0.x and 8.1.x. Thanks!