Project

General

Profile

Actions

Feature #50186

closed

pageNotFound_handling should tell about misconfiguration

Added by Anonymous almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Link Handling, Site Handling & 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

Also available in: Atom PDF