Project

General

Profile

Actions

Feature #50186

closed

pageNotFound_handling should tell about misconfiguration

Added by Anonymous over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2013-07-19
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

This is the situation:

$TYPO3_CONF_VARS['SYS']['curlUse'] = '1';
$TYPO3_CONF_VARS['SYS']['curlProxyServer'] = 'mistyped_wwwproxy:81';
$TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/index.php?id=511

Now a user tries to visit a non existing page.

When cUrl is active but proxy is not set up correctly, server-sided fetching of the 404-Page (and sending that content as 404) fails and TYPO3 redirects via 303 to that url instead. Unfortunatelly without telling anyone (FE user, log, ...) that this is due to a misconfiguration.

1944             // Prepare headers
1945             $headerArr = array(
1946                 'User-agent: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'),
1947                 'Referer: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')
1948             );
1949             $res = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($code, 1, $headerArr);
1950             // Header and content are separated by an empty line
1951             list($header, $content) = explode(CRLF . CRLF, $res, 2);
1952             $content .= CRLF;
1953             if (FALSE === $res) {
1954                 // Last chance -- redirect
1955                 \TYPO3\CMS\Core\Utility\HttpUtility::redirect($code);

Reading the forth (opional) parameter $report of the function getUrl could be a possible solution. In my case it returned the message "Couldn't resolve http://mistyped_wwwproxy/" or something like that. Would be nice to find this message in the backend's log module.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Story #65730: Usability pageNotFound handlingClosed2015-03-14

Actions
Actions #1

Updated by Philipp Gampe over 11 years ago

  • Status changed from New to Accepted

I would prefer a more generic solution. If fetching the file/URL returns false, then an exception should be thrown. This can then be catched by the ExeptionHandler (will both log it and display the message if dev settings are used).

Can you create a patch for this? http://wiki.typo3.org/CWT

Actions #2

Updated by Anonymous over 11 years ago

Philipp Gampe wrote:

I would prefer a more generic solution. If fetching the file/URL returns false, then an exception should be thrown.

You mean instead of the "Last chance" redirect?

Actions #3

Updated by Philipp Gampe over 11 years ago

I am not into the code. Will need to take a look ... ping me in a couple of days of nobody else answers.

Actions #4

Updated by Anonymous over 11 years ago

Ping ;-)

Philipp Gampe wrote:

I am not into the code. Will need to take a look ... ping me in a couple of days of nobody else answers.

Actions #5

Updated by Mathias Schreiber almost 10 years ago

  • Priority changed from Should have to Could have
  • Target version set to 7.2 (Frontend)
  • Is Regression set to No
Actions #6

Updated by Mathias Schreiber almost 10 years ago

  • Tracker changed from Bug to Feature
Actions #7

Updated by Benni Mack over 9 years ago

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

Updated by Susanne Moog over 9 years ago

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

Updated by Benni Mack about 9 years ago

  • Target version changed from 7.5 to 7 LTS
Actions #10

Updated by Benni Mack about 9 years ago

  • Target version deleted (7 LTS)
Actions #11

Updated by Riccardo De Contardi about 7 years ago

  • Category set to Site Handling, Site Sets & Routing
Actions #12

Updated by Gerrit Code Review about 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #13

Updated by Gerrit Code Review about 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #14

Updated by Gerrit Code Review about 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #15

Updated by Gerrit Code Review about 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #16

Updated by Gerrit Code Review about 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #17

Updated by Gerrit Code Review about 7 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #18

Updated by Gerrit Code Review almost 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54494

Actions #19

Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54808

Actions #20

Updated by Markus Klein almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #21

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF