Problem/Motivation

If we set "/user/logout" as front page then whenever logged-in user visit home page then user gets logout , and if we set "/user/password" as home page then it home page shows that if we want to reset password we have to log-out first. So it's better to disallow user to set user logout and user forgot password page as front page.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3104163

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Hardik_Patel_12 created an issue. See original summary.

hardik_patel_12’s picture

Assigned: hardik_patel_12 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.82 KB

Kindly review a new patch

Status: Needs review » Needs work

The last submitted patch, 2: 3104163-2.patch, failed testing. View results

hardik_patel_12’s picture

Status: Needs work » Needs review
StatusFileSize
new284 bytes
new1.82 KB

kindly follow a new patch.

Status: Needs review » Needs work

The last submitted patch, 4: 3104163-4.patch, failed testing. View results

kishor_kolekar’s picture

Hi @Hardik_Patel_12 test cases are filed can u please look in to it ..

Thanks!

hardik_patel_12’s picture

Status: Needs work » Needs review
StatusFileSize
new1.56 KB
new1.5 KB

Kindly review a new patch

Adev22’s picture

Status: Needs review » Reviewed & tested by the community

I've applied the patch #7 and working on me

kishor_kolekar’s picture

StatusFileSize
new4.7 KB
new3.84 KB

Also User logout and user forgot password page should not be set as Default 403 (access denied) page and Default 404 (not found), added new patch and interdiff file,Kindly review the patch.

kishor_kolekar’s picture

Status: Reviewed & tested by the community » Needs work
kishor_kolekar’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: 3104163-8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

kishor_kolekar’s picture

kishor_kolekar’s picture

StatusFileSize
new4.33 KB
new4.35 KB

Kindly review a new patch #14

kishor_kolekar’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 14: 3104163-14.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

hash6’s picture

Assigned: Unassigned » hash6

Instead of updating the value in the buildForm() I would suggest to add it under the validate().

longwave’s picture

Why would anyone try to do this? This seems a bit of a pointless thing to protect against, there are many things an administrator can do to stop their Drupal site working properly and we don't stop them doing those either.

hash6’s picture

Assigned: hash6 » Unassigned
StatusFileSize
new4.35 KB

Since I have already created a patch, will add it incase someone needs it.

hardik_patel_12’s picture

It's better to stop if admin try to do unusual thing like this case, and core has already applied condition for user login page so we can add extra condition for user registration and forgot password page also.

hardik_patel_12’s picture

Status: Needs work » Needs review
avpaderno’s picture

There are many pages that should not be set as front page. Why should we worry about the user logout page, and the page to request a new password? The worst that can happen is that the user is logged-out, but that just make me think the logout page should ask confirmation to the user about logging out.

avpaderno’s picture

Instead of handling two specific cases out of all the possible ones, I think that a generic way to mark a route as not suited for front page, 404, and 403 pages would be preferable. For example, a property in the route could tell Drupal not to use a route for those pages.

longwave’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

#23 is a better idea if we have to do this at all. Also, any changes here will need tests.

avpaderno’s picture

Just to make clear my previous comment, I am thinking of a property a form validation handler could use to accept a route.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mstrelan’s picture

Issue summary: View changes

Added the issue template. Agree with #23 and #24, but don't really think it's worth the effort.

avpaderno’s picture

Issue tags: +Needs merge request

anjaliprasannan made their first commit to this issue’s fork.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.