Project

General

Profile

Actions

Bug #95940

closed

Error on random urls which should show 404 page

Added by Stig Nørgaard Færch about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2021-11-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When requesting an address which should return 404, sometimes instead another error is displayed.
I've found no consistency on when this happens. I can request an address and the 404 is shown, but next time the same page will give the other error instead:

1/1) TypeError

fseek() expects parameter 1 to be resource, int given

in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 210


        }
        if (!$this->seekable) {
            throw new \RuntimeException('Stream is not seekable');
        }
        if (fseek($this->stream, $offset, $whence) === -1) {
            throw new \RuntimeException('Unable to seek to stream position '
                . $offset . ' with whence ' . var_export($whence, true));
        }
    }

at fseek()
in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 210

        }
        if (!$this->seekable) {
            throw new \RuntimeException('Stream is not seekable');
        }
        if (fseek($this->stream, $offset, $whence) === -1) {
            throw new \RuntimeException('Unable to seek to stream position '
                . $offset . ' with whence ' . var_export($whence, true));
        }
    }

at GuzzleHttp\Psr7\Stream->seek()
in /var/www/html/vendor/guzzlehttp/psr7/src/Stream.php line 81

    public function __toString(): string
    {
        try {
            if ($this->isSeekable()) {
                $this->seek(0);
            }
            return $this->getContents();
        } catch (\Throwable $e) {
            if (\PHP_VERSION_ID >= 70400) {

at GuzzleHttp\Psr7\Stream->__toString()
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 75

        if ($body instanceof SelfEmittableStreamInterface) {
            // Optimization for streams that use php functions like readfile() as fastpath for serving files.
            $body->emit();
        } else {
            echo $body->__toString();
        }
    }

    /**

at TYPO3\CMS\Core\Http\AbstractApplication->sendResponse()
in /var/www/html/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 107

        } catch (ImmediateResponseException $exception) {
            $response = $exception->getResponse();
        }

        $this->sendResponse($response);
    }
}

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/public/index.php line 20

// Set up the application for the frontend
call_user_func(static function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});

at {closure}()
in /var/www/html/public/index.php line 21

call_user_func(static function () {
    $classLoader = require dirname(__DIR__).'/vendor/autoload.php';
    \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(0, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_FE);
    \TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Frontend\Http\Application::class)->run();
});


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #95586: PageNotFound handling doesn't work in debug modeClosedGeorg Ringer2021-10-12

Actions
Related to TYPO3 Core - Bug #94402: Don't issue second HTTP request for error handlingClosed2021-06-23

Actions
Actions

Also available in: Atom PDF