Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError for page after redirect #519

Closed
bartdigitalpulse opened this issue Jun 20, 2023 · 2 comments
Closed

TypeError for page after redirect #519

bartdigitalpulse opened this issue Jun 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@bartdigitalpulse
Copy link

Everytime we visit a url that is redirected by the Retour plugin we get an TypeError. Stack trace below.
Example redirect: https://mywebsite.com/nl/category/entry-slug-2 (no longer exists) to https://mywebsite.com/nl/entry-slug-2

The "category/entry-slug-2" does not exist in the cache folder. "category/entry-slug" exists. Tried to refresh cache but it doesn't work.

PHP version 8.1.20
Database driver & version MySQL 8.0.33
Craft edition & version Craft Pro 4.4.5
Blitz 4.4.4

TypeError: putyourlightson\blitz\services\GenerateCacheService::save(): Argument #1 ($content) must be of type string, null given, called in /vendor/putyourlightson/craft-blitz/src/services/CacheRequestService.php on line 413
#8 /vendor/putyourlightson/craft-blitz/src/services/GenerateCacheService.php(397): putyourlightson\blitz\services\GenerateCacheService::save
#7 /vendor/putyourlightson/craft-blitz/src/services/CacheRequestService.php(413): putyourlightson\blitz\services\CacheRequestService::saveAndPrepareResponse
#6 /vendor/putyourlightson/craft-blitz/src/Blitz.php(307): putyourlightson\blitz\Blitz::putyourlightson\blitz\{closure}
#5 [internal](0): call_user_func
#4 /vendor/yiisoft/yii2/base/Event.php(312): yii\base\Event::trigger
#3 /vendor/yiisoft/yii2/base/Component.php(642): yii\base\Component::trigger
#2 /vendor/yiisoft/yii2/web/Response.php(340): yii\web\Response::send
#1 /vendor/yiisoft/yii2/base/Application.php(390): yii\base\Application::run
#0 /index.php(12): null
@bartdigitalpulse bartdigitalpulse added the bug Something isn't working label Jun 20, 2023
@bencroker
Copy link
Collaborator

Thanks for reporting this! Fixed in 04fdcd4 for the next release.

@bencroker
Copy link
Collaborator

Released in version 4.4.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants