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
From @David_Rothstein in #630446: Allow SimpleTest to test the non-interactive installer:
Note that if I switched this test to using the standard install profile and additionally searched for "Welcome to [site:name]" on the front page, it would probably reveal a bug since right now in Drupal 8 it seems to be hardcoded to say "Welcome to Drupal" - not sure if there's an issue for that.
Proposed resolution
Use the [site:name]
token for the frontpage title.
Comment | File | Size | Author |
---|---|---|---|
#19 | drupal-1963268-19.patch | 6.27 KB | dawehner |
#19 | interdiff.txt | 3.32 KB | dawehner |
#14 | drupal-1963268-14.patch | 5.17 KB | dawehner |
#14 | interdiff.txt | 1.65 KB | dawehner |
#10 | views-1963268-10.patch | 4.81 KB | xjm |
Comments
Comment #1
xjmWith patch applied:
Comment #2
xjmBTW, I confirmed that D7 apparently did say "Welcome to mysite" rather than "Welcome to Drupal".
Comment #3
tim.plunkettThat means we're missing tests for that old behavior.
Comment #4
xjm@dawehner and I just discussed this and it looks like we didn't actually add any tests for this view at all. @dawehner is looking into it.
Comment #5
dawehnerSpotted another bug: we ordered first by date and then by sticky ascending, which is pretty useless, if not really wrong.
Comment #7
dawehnerAnd back.
Comment #8
xjmTests look great, and the new sorting is much better as well.
Fixed in attached: s/then/than
Comment #10
xjmErm. Real patch this time.
Comment #12
xjm#10: views-1963268-10.patch queued for re-testing.
Comment #13
olli CreditAttribution: olli commentedGreat work.
Not used.
What about making one of these nodes sticky, promoted and unpublished?
Comment #14
dawehnerIs there any magical trick you apply to catch these things? Awesome!
I like this idea. I went with one published, but not promoted,
one promoted but not published and one promoted sticky but not published. This seems to really cover the cases.
Comment #15
xjmSome crazy extra whitespace here.
Looks great though.
Edit: we should probably save the names of the four "do not want" nodes to an array, and assert that none of them are listed?
Comment #16
olli CreditAttribution: olli commentedShould we also check that after creating some content the title is gone? (Or actually.. why are we using no results title and not the normal title on front page?)
Comment #17
xjmThis is feature parity with D7. When you install Drupal and have no content, it tells you what to do. As soon as you create content, there's no more need for the "welcome" title. At that point the D7 behavior is to simply have a list of teasers. Now the user can add an additional title if he or she wants (now that #1956912: Title area handler sets the title even when it should not (results in "Welcome to Drupal" never going away) is fixed), but by default there is no title.
Comment #18
olli CreditAttribution: olli commentedI see, thanks. I was thinking the other way around: Now in D8 the user can easily remove the default title if he or she wants =)
Comment #19
dawehnerFixed that.
Comment #20
olli CreditAttribution: olli commentedLooks good if not perfect to me.
Comment #21
xjmThat's not a confidence-inspiring RTBC for maintainers; what are your concerns?
Comment #22
olli CreditAttribution: olli commentedOh, sorry. I was trying to say that this looks really great to me: fixes the original problem and another bug and adds test coverage even beyond that.
Comment #23
webchickI, for one, am happy to be welcomed to "OHAI I HAZ A SITE NAME." :)
Committed and pushed to 8.x. Thanks!