Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2015 at 17:47 UTC
Updated:
29 May 2025 at 05:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
chi commentedCould not find any tests for this form.
Comment #3
chi commentedSmall cleanup.
Comment #4
chi commentedanother one
Comment #8
chi commentedComment #9
swentel commentedHmm, this probably happens for site_403 and site_404 as well
Comment #10
Anonymous (not verified) commentedThis rather confusing validation message is the result of the default fallback to /user/login. By design, an authenticated user gets denied access to that page (see #2288911: Use route name instead of system path in user maintenance mode subscriber). We could work around the issue by changing the fallback to /user as demonstrated in this patch. However, this introduces a redirect for anonymous users on the homepage, so it might not be the best solution.
I also tested 403 and 404, and they seem to work as expected.
Comment #20
raman.b commentedRe-rolling for the current dev branch
Comment #21
raman.b commentedThe issue seems to exist in the current dev branch as well.
Re-uploading test only patch, resolving a few deprecations.
Comment #23
ranjith_kumar_k_u commentedI have tested the last patch,it works fine .
Before Patch

After Patch

Comment #24
alexpottI don't understand why we're changing this when it is blank. If this is the fix then the comment
// Set to default "user/login".needs updating.I think we need to reassess this patch. How is this ever blank? Ah I see...
$front_page = $site_config->get('page.front') != '/user/login' ? $this->aliasManager->getAliasByPath($site_config->get('page.front')) : '';is odd code.I think we should be using the getUrlIfValidWithoutAccessCheck() check and not check access on these links. It's not relevant.
Comment #25
raman.b commentedUsing
getUrlIfValidWithoutAccessCheck()solves the reported issueShould we open a follow up to better handle the default value?
Comment #26
raman.b commentedWe'll also need to update the error message
Comment #28
longwaveWorks for me, removes the strange error message.
Comment #29
longwaveNeeds reroll for 9.3.x though.
Comment #30
dhirendra.mishra commentedRe-rolled it.
Kindly review it.
Comment #31
longwaveWe now need to use
$this->assertSession()->pageTextContains()here.Comment #32
ankithashettyFixed test failure errors as suggested in #31, thanks!
Comment #33
longwaveThanks! RTBC if bot agrees.
Comment #34
alexpottLet's not add a whole new test to maintain especially when we have \Drupal\Tests\system\Functional\System\FrontPageTest::testDrupalFrontPage already that uses this form and tests this logic already.
We could add to the bottom of \Drupal\Tests\system\Functional\System\FrontPageTest::testDrupalFrontPage - this test describes itself as
Comment #35
vakulrai commentedHi , I have modified #32 as per #34 suggestions, adding the interdict and patch for the same.
Thanks!
Comment #36
longwaveWe need to explicitly set
site_frontpageto an empty string for this test, we don't need to set the other settings here, and I think we should add a comment to explain the case we are testing.Comment #37
vakulrai commentedThanks @longwave for pointing out , I have modified the tests and added a description.
Please review.
Comment #39
joachim commentedLGTM.
Comment #40
alexpottThe patch does not apply to 9.4.x and hasn't for a few months.
Comment #41
ankithashettyRerolled the patch, thanks!
Comment #44
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Reroll looks good and issue is still addressed.
Comment #45
quietone commentedThe issue summary is a statement of the problem. There is no indication of the proposed resolution.
I then went to apply the patch. I see that is against 9.4, which is in security support. The patch applied to 10.1.x so I tested it using the steps in the issue summary.
With the patch, it is now possible to save the basic sites settings page with an empty field for the default front page. I then looked at the system.site configuration.
The front page path has not changed and we have the UI showing incorrect information. I then used the UI to change the the front page configuration to an empty string. I confirmed the change with drush
front: ''. On navigating to the front page, I get a 404.I don't know if that is the intended behavior. But having the UI and the stored configuration out of sync is wrong.
I am adding a tag for an issue summary update and setting back to needs work.
Comment #46
prem suthar commentedRe-Roll the Patch For 10.1 by #41.
Comment #47
smustgrave commented#46 was unnecessary as patch 41 still applied to D10 hiding patch.
Also please include an interdiff with all patches
Comment #48
longwaveI forgot that I commented on this issue before. I propose simplifying this setting and making the field required over in #2671174: Make default front page setting required and remove special case of /user/login - this would mean this issue is no longer required.
Comment #50
mstrelan commentedAs per #48 this is no longer required