Project

General

Profile

Actions

Feature #17418

closed

Page 404 -- check for logged in or not

Added by Chris Paige almost 17 years ago. Updated over 2 years ago.

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

0%

Estimated time:
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 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #17891: Page 404 - check logged in or notClosedOliver Hader2007-12-05

Actions
Actions #1

Updated by Yannick Pavard over 16 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 !

Actions #2

Updated by Navi over 12 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?

Actions #3

Updated by Ernesto Baschny about 12 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #4

Updated by Navi over 11 years ago

  • Target version changed from 4.5.12 to 4.5.21

Bug still present!

Actions #5

Updated by Mathias Schreiber about 9 years ago

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

Updated by Benni Mack almost 9 years ago

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

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #8

Updated by Benni Mack over 8 years ago

  • Target version deleted (7.5)
Actions #9

Updated by Riccardo De Contardi almost 8 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?

Actions #10

Updated by Benni Mack almost 5 years 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.

Actions #11

Updated by Riccardo De Contardi almost 5 years ago

@Benni Mack

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
Actions #12

Updated by Susanne Moog about 4 years ago

  • Status changed from Needs Feedback to Accepted
Actions #13

Updated by Benni Mack over 2 years ago

  • Status changed from Accepted to Closed

We now have the new error handling in TYPO3 v9 PLUS the logic with the flag "subrequestPageErrors" which keeps cookies. So we're good to go in this case.

Actions

Also available in: Atom PDF