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
Visiting the config translation listing of fields you get a WSOD
Proposed resolution
Fix +
Add testing for that page.
Remaining tasks
Review patch.
User interface changes
No WSOD.
API changes
None.
Data model changes
None.
Release notes snippet
None.
Original Report
\Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::createInstance
doesn't pass the 'entity_type.bundle.info'
service to the constructor in the same class.
That would mean that deprecation cannot be removed in D9.
But it was already removed in D9.0.0, so means that
a) we are lacking coverage for something in the list builder;
b) that argument was not needed at all
Comment | File | Size | Author |
---|---|---|---|
#14 | 3131388-field-config-translation-ui-test-14.patch | 2.86 KB | penyaskito |
#14 | 3131388-field-config-translation-ui-test-14.only-tests.patch | 1.91 KB | penyaskito |
Comments
Comment #2
Berdir> b) that argument was not needed at all
It's defined as required, which means it is. a) seems to be the only possible explanation, no test coverage of field translation overview?
Comment #3
penyaskitoSorry, wrote in a rush. Meant the parameter was unused in executed code paths or untested.
I think it's only used for knowing if the bundle column must be shown, I'm writing a test for that.
Comment #4
BerdirSimply instantiating the class should be enough to trigger test fails. Passing (implicit) NULL to an argument that is required should cause php notices/warnings which in turn should cause tests to fail.
Comment #5
penyaskitoThis should fail in D9
Comment #6
penyaskitoError in D9 while visiting a fields listing in config translation is:
Comment #8
penyaskitoThat test was wrong. No need to add a dependency on block_content module, I rewrote that.
I'm going to split this in two issues, for 9.0.x and 8.9.x, as the output is quite different.
9.0.x is definitely a major bug, as we get a WSOD in a Drupal core page with just visiting it.
8.9.x is, IMHO, a major (task) too, but maybe can be demoted to Normal. In any case I hope it goes into 8.9.x release for deprecation sake.
Comment #9
penyaskitoComment #10
penyaskitoCreated #3131435: ConfigTranslationFieldListBuilder::createInstance missing entity_type.bundle.info service for the 8.9.x issue.
Comment #12
Gábor HojtsyWow, good find. Thanks for investigating and providing a fix. Patch looks good other than:
Accidental changes.
Comment #13
Gábor HojtsyAlso what are the differences between this and #3131435: ConfigTranslationFieldListBuilder::createInstance missing entity_type.bundle.info service? It should be possible to post on one issue (select "Test with" when uploading the patch) both patches. I don't see what's the difference sorry.
Comment #14
penyaskitoLet's try that then and I'll close the other one.
Comment #15
penyaskitoComment #17
Gábor HojtsyWhile this is only a WSOD in Drupal 9, raising to critical because we are supposed to file issues against 8.9 first.
This looks good to me now. I only wonder how far back should we add this, given that it is "only" a deprecation in Drupal 8.
Comment #18
penyaskitoA reason to commit this to 8.9: any contrib tests that may hit the config translation fields overview pages are going to fail if not marked as legacy. As an example, see #3129752: Remove @group legacy from our tests.
Comment #22
catchCommitted/pushed to 9.1.x and cherry-picked back to 8.9.x, thanks!