Problem/Motivation
When installing with the standard profile the front page is set to node
. On all other profiles (including testing and minimal), the front page is set to user
(#375397-91: Make Node module optional) and recently to user/login
. However, the login page behaves different for authenticated users and that leads to tests being forced to implement workarounds (e.g. \Drupal\system\Tests\System\AdminTest::testCompactMode()
).
Also when installing with the minimal profile, the frontpage shows the login-form as well as the login-block in the sidebar.
In addition, this will help with test-failures over in #2288911: Use route name instead of system path in user maintenance mode subscriber.
Proposed resolution
Introduce a default system frontpage (on system/frontpage
) showing the simple message No front page has been configured yet.
Remaining tasks
User interface changes
Front page is set to system/frontpage
unless changed by the install profile. This only affects testing and minimal profile, standerd profile already sets the frontpage to node
.
It has been pointed out on other occasions (#375397-123: Make Node module optional), that its the job of the installation profile to set the frontpage to a sensible value. Therefore third-party install profiles are not expected to be affected by this change.
API changes
Comment | File | Size | Author |
---|---|---|---|
#14 | 2364643-system-frontpage-14.diff | 18.29 KB | znerol |
#12 | 2364643-system-frontpage-12.diff | 18.28 KB | znerol |
#6 | interdiff.txt | 3.83 KB | znerol |
#6 | 2364643-system-frontpage-6.diff | 18.36 KB | znerol |
#4 | interdiff.txt | 7.54 KB | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedComment #3
dawehnerI thinkwe should we should link to the frontpage configure page, in case the user has the permission to do so.
Comment #4
znerol CreditAttribution: znerol commentedDone. Also fixed the installer tests.
Comment #6
znerol CreditAttribution: znerol commentedFix remaining tests:
LanguageSwitchingTest::doTestLanguageBlockAuthenticated()
assumed that we are redirected to the user profile when accessing the front page with an authenticated user.ContentNegotiationTest::testBogusAcceptHeader()
assumed a login-form and did not even care to check the HTTP response code.Comment #7
dawehnerI really like the general idea to not have a special route like
user/login
ornode
by default.On top of that the message is kinda similar to the other normal frontpage already.
Comment #8
Dries CreditAttribution: Dries commentedThis patch makes sense to me; it actually makes for a nice little usability improvement. Looking at https://www.drupal.org/node/1397862 and #375397: Make Node module optional, changing it to "/user" was just an an easy/reliable thing to do.
However, I don't think this is "major" so I'm making it "normal". Evaluating it in terms of #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?, it does not improve performance, security, performance, etc., nor fix an actual bug. However, there is a case to be made that this is a small usability improvement, and it also improves testability. So in this case the question we should ask ourselves is whether the impact of this change is greater than the disruption it introduces. (See: https://www.drupal.org/node/2350615#disruption) To me, it does not seem that the impact of this issue merits the disruption. So, I am postponing this issue. If you disagree, please update the issue summary and set it back to needs review.
Comment #9
znerol CreditAttribution: znerol commentedIt is necessary for #2288911: Use route name instead of system path in user maintenance mode subscriber, therefore should have the same priority. Because the other issue removes instances of the
_system_path
request attribute, I think this should be included in 8.0.x. Updated user interface changes section of issue summary.Comment #10
dawehnerThank you znerol to stay strong!
ITs a good point that this is required for a major issue, but there is more.
This also removes the amount of brittleness and based upon that reduces the maintenance cost of the longrun.
For example its just ridiculous that system module configuration relies on user module being installed.
So for example in case we would do proper config validation installing system module in the installer should fail, because system.module
does not require user module.
Which disruption does that cause? No custom site updating their config would have to change anything, because config is never load out of
the module folder, but there is just all the active config.
Comment #11
znerol CreditAttribution: znerol commentedComment #12
znerol CreditAttribution: znerol commentedComment #13
znerol CreditAttribution: znerol commentedWe need this to #2371629: [meta] Finalize Session and User Authentication API.
Comment #14
znerol CreditAttribution: znerol commentedReroll after #2354597: Remove usage of form_set_value()..
Comment #15
moshe weitzman CreditAttribution: moshe weitzman commentedCode looks good. I think the benefits have been explained and the disruption is non-existent.
Comment #16
dawehner+1
Comment #17
alexpottWe need to prevent access to this page once the frontpage has been set to something esle.
Comment #18
effulgentsia CreditAttribution: effulgentsia commentedWhile I like this patch, I think it should be re-postponed to 8.1.x, because I don't agree with #9 or #10.
I posted a patch in #2288911-58: Use route name instead of system path in user maintenance mode subscriber to move that issue along without this one.
user.info.yml lists user module as required. So while the coupling isn't clean, it doesn't create any real problems AFAICT.
Comment #19
znerol CreditAttribution: znerol commentedThanks @effulgentsia. I will postpone this as soon as #2288911: Use route name instead of system path in user maintenance mode subscriber gets committed.
Comment #25
raphaeltbm CreditAttribution: raphaeltbm commentedI guess this issue is related in some ways.
My own last comment #1503146-21: Aliased paths cannot be set as front page.