Redirect to Login page fails when accessing a page with permission "Registered users" in a multi-language portal when navigating with the second languge

Description

This issue is to isolate the remaining issues in the original ticket:https://dnntracker.atlassian.net/browse/DNN-7812.
Remaining issues:
Using Evoq_Content_9.2.0.102-818. & Evoq_Content_9.2.0.121-879.
Prerequisite data:

  • Site with two locals installed correctly.

  • Login page created, published, localized for both of the locals with view permission set for All users.

  • Login page is set in the site settings for both of them.

  • Restricted page created, published, localized for both of the locals with view permission set for registered users only.
    Covered Scenarios:

  1. Main site, with two locals, while logged out, trying to refresh the url with no language parameters or pages specified, should redirect to home page of default language. Bug: It redirects to the home page of the 2nd locale.
    https://www.screencast.com/t/JxjtLJOr

  2. For a child site, same above mentioned case, redirects after refresh to the same language that was loaded before the refresh, while it should redirect to the default language >Bug.

The Original customer issue was:
Brief Description of Issue.
When accessing a page with permission "Registered users" of a multi-language portal using the second language (that is different from the default one), the user is redirected to the home page of the default language instead of the login page of the current language.

Steps to reproduce the issue.
1: Install a DNN 7.4.2. blank website in English (United States).
2: Add a second language (ie. it-IT).
3: Enable "Allow Content Localization" in Host > Host settings > Other settings.
4: In Admin > Languages press button "Enable Localized Content". In the opened popup window set "Make all pages Translatable" (English - United States will be set as Current Site Default) and press "Enable Localized Content".
5: In Admin > Languages set "Enabled" check box of the added second language in "Enabled" column.
6: In Admin > Languages click on the icon "Create pages in this language" in "Pages" column.
7: In Admin > Languages click on "Active" check box in "Active" column.
8: Translate and publish the home page of the second language
9: In English - United State language, add a Login page. Add "Account login" module to this page. Set page permission to "All users" for this page.
10: In second language, copy "Account login" module, translate and publish the Login page.
11: Set the Login page for both languages in Admin > Site settings > Advanced settings.
12: In English - United State language, add a new page (ie. "Reserved page"). Set page permission to "Registerd Users".
13: In second language, translate (ie. "Pagina riservata) and publish the page added in step 12.
14: Switch to the home page of second language and try to access the page added in step 13 (ie. /it-it/Pagina-riservata) as a not logged in user.

Actual result:
Redirection to the home page of the default language (ie. /en-us)

Expected result:
Redirection to the login page of the current laguage (ie. /it-it/login?returnurl=/it-it/Pagina-riservata)

Central Jira Link: https://jira.devfactory.com/browse/DNN-17938

QA Test Plan

None

Assignee

Unassigned

Reporter

Nesma Ashraf

Story Size

Unknown

Severity

Major

Triage

New

Reported in Build #

None

Fixed in Build

None

Dev Owner

None

Includes Code Fix

No

Documentation Required

None

Trouble Ticket

None

Requires More Info

None

QA Story Points

None

QA Owner

None

Injected

None

Automation Required

None

Code Review Owner

None

Story Points

2

Priority

High
Configure