Feature #17418

Page 404 -- check for logged in or not

Added by Chris Paige over 12 years ago. Updated 6 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2007-06-25
Due date:
% Done:

0%

PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

Description

I have a "404 - page not found" page setup and it works fine, in general.

I would like to have it display one set of content if the user is not logged (i.e. "you need to log in!") and a different message if the user is logged in (i.e. a sitemap). I have used the visibility settings on content elements to attempt this scenario (i.e. show at any login, Hide at any login).

However, the 404 renders as if not logged in, even if I am logged in. I am guessing that the 404 page does not check cookies for some reason?

(issue imported from #M5850)


Related issues

Duplicated by TYPO3 Core - Bug #17891: Page 404 - check logged in or not Closed 2007-12-05

History

#1 Updated by Yannick Pavard almost 12 years ago

Oki, but it's correct.

Hide at login = hidden page

hidden page = not visible for visitor

If you want a good process, do not redirect user to HIDE TO LOGIN page, but to visible or page NOT IN MENU

I don't if my english is correct, but now i'm sure that 404 process is correct.

thank you for dimitry's work !

#2 Updated by Navi almost 8 years ago

  • Target version changed from 0 to 4.5.8

Hello,

This bug is more then 4 years old but still seems to be present.

It's really confusing that a user seems to be logged out on the 404 page.

What is needed to fix this bug?

#3 Updated by Ernesto Baschny over 7 years ago

  • Target version changed from 4.5.8 to 4.5.12

#4 Updated by Navi about 7 years ago

  • Target version changed from 4.5.12 to 4.5.21

Bug still present!

#5 Updated by Mathias Schreiber almost 5 years ago

  • Description updated (diff)
  • Category deleted (Communication)
  • Target version changed from 4.5.21 to 7.2 (Frontend)
  • Is Regression set to No

#6 Updated by Benni Mack over 4 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)

#7 Updated by Susanne Moog about 4 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#8 Updated by Benni Mack about 4 years ago

  • Target version deleted (7.5)

#9 Updated by Riccardo De Contardi over 3 years ago

  • Tracker changed from Bug to Feature
  • Category set to Frontend
  • Target version set to Candidate for Major Version

As far as I have understood, the goal here is to render a different message/page if the requested page is password-protected and the user is not logged in, so he/she can't access it. In this case a 403 page should be more appropriate.

I change this as "feature" because it is more a feature request.

Currently, the extension "pagenotfoundhandling" can be used to handle the 403 pages as TYPO3 pages or as static pages.

Is there something I am missing or I have not understood?

#10 Updated by Benni Mack 6 months ago

  • Status changed from New to Needs Feedback

Hey Riccardo,

I think this can be closed, as TYPO3 v9 site handling allows to use different error pages based on 404/403 status code, right?

Can you verify this?

Thanks.
Benni.

#11 Updated by Riccardo De Contardi 6 months ago

@Benni

I tried the following tests with TYPO3 9.5.5

Test1 - setup

  1. Fresh TYPO3 installation
  2. Create a minimal setup for frontend users as following
    1. create a FE usergroup "TEST1"
    2. create a FE usergroup "TEST2"
    3. create a FE user "test" and assign it to "TEST1"
  3. Create the following pages
    1. Create a page called "404 Error"
    2. Create a page called "403 Error"
    3. Create a page called "forbidden page" and assign it the FE usergroup "TEST2"
  4. Edit the site configuration
    1. Error Handling > Create new
      1. HTTP Status Code: 404
      2. How to handle error: Show content from Page
      3. Show content from page: select "404 Error"
    2. Error Handling > Create new
      1. HTTP Status Code: 403
      2. How to handle error: Show content from Page
      3. Show content from page: select "403 Error"

Test 1 - execution (executed with Chrome in incognito mode)

FE user status try to access a non-existent url (https://mysite/xerwq) try to access the forbidden page (https://mysite/forbidden-page)
not logged in redirected to page "404 Error" redirected to page "403 Error"
logged in redirected to page "404 Error" redirected to page "403 Error"

Test 2 - setup

  1. same as Test 1
  2. "404 Error" page >
    1. create a CE "Headline",
      1. call it "I AM NOT LOGGED IN"
      2. set Access > "Hide at Login"
    2. create a CE "Headline",
      1. call it "I AM LOGGED IN"
      2. set Access > "Show at any Login"
  3. "403 Error" page >
    1. create a CE "Headline",
      1. call it "I AM NOT LOGGED IN"
      2. set Access > "Hide at Login"
    2. create a CE "Headline",
      1. call it "I AM LOGGED IN"
      2. set Access > "Show at any Login"

Test 2 - Execution

FE user status try to access a non-existent url (https://mysite/xerwq) try to access the forbidden page (https://mysite/forbidden-page)
not logged in redirected to page "404 Error" - shows "I AM NOT LOGGED IN" content redirected to page "403 Error" - shows "I AM NOT LOGGED IN" content
logged in redirected to page "404 Error" - shows"I AM NOT LOGGED IN" content redirected to page "403 Error" - shows "I AM NOT LOGGED IN" content

Also available in: Atom PDF