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
When no pages are specified, the summary prints out:
Return true on the following pages:
or
Do not return true on the following pages:
Whereas it should return an empty string signifying that it's not actually configured.
Steps to reproduce
Install the asset_injector
module, and save a simple asset configuration without any conditions.
The summary will be inaccurate:
Proposed resolution
The summary needs to be more accurate, returning an empty string if it's unconfigured.
Remaining tasks
Provide a patch/bugfix.
Comment | File | Size | Author |
---|---|---|---|
#12 | 3202434-12.patch | 1.43 KB | paulocs |
#12 | interdiff-7-12.txt | 793 bytes | paulocs |
#7 | 3202434-7.patch | 1.48 KB | paulocs |
#7 | 3202434-7-TEST-ONLY.patch | 794 bytes | paulocs |
#7 | interdiff-2-7.txt | 1.38 KB | paulocs |
Comments
Comment #2
paulocsComment #3
adalbertov CreditAttribution: adalbertov at CI&T commentedHello folks, just checked this issue. After the patch the summary return looks better. Since the code is fine for me, I'm moving the issue to RTBC
Comment #4
joachim CreditAttribution: joachim as a volunteer commentedNitpick: you can check for empty before the implode().
Second nitpick: I think that configuration is usually talked about in the present tense, rather than past tense? I don't see anything about that in https://www.drupal.org/docs/develop/user-interface-standards/interface-text though.
Comment #5
catchThis could also use some test coverage.
Comment #6
paulocsOk, I'll provide a new patch.
Comment #7
paulocsComment #9
guilhermevp CreditAttribution: guilhermevp at CI&T commentedTest-only patch returns specific error, and patch works as intended.
Moving to RTBC.
Comment #10
guilhermevp CreditAttribution: guilhermevp at CI&T commentedComment #11
catchI don't think we need the custom assertion message here - can just use phpunit's default one.
Comment #12
paulocsI removed the custom message parameter in the
$this->assertEquals
function.Comment #13
thallesComment #15
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!