masugadesign / link-vault-craft-cms

The Link Vault download link protection plugin for Craft CMS v3.
Other
5 stars 2 forks source link

Calling unknown method: craft\web\Request::redirect() #9

Closed simonkuran closed 4 years ago

simonkuran commented 4 years ago

When I click on a Link Vault link I get a "Calling unknown method: craft\web\Request::redirect()" error.

Both {{ craft.linkvault.downloadUrl('http://mysite.test/assets/files/file.pdf') }} and {{ craft.linkvault.downloadUrl(assetVariable) }} Give the same error.

Stack trace yii\base\UnknownMethodException: Calling unknown method: craft\web\Request::redirect() in /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/base/Component.php:300 Stack trace:

0 /Applications/MAMP/htdocs/cdr/vendor/masugadesign/linkvault/src/services/GeneralService.php(311): yii\base\Component->__call('redirect', Array)

1 /Applications/MAMP/htdocs/cdr/vendor/masugadesign/linkvault/src/controllers/FrontEndController.php(42): Masuga\LinkVault\services\GeneralService->download(Array)

2 [internal function]: Masuga\LinkVault\controllers\FrontEndController->actionServe()

3 /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)

4 /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)

5 /Applications/MAMP/htdocs/cdr/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('serve', Array)

6 /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('serve', Array)

7 /Applications/MAMP/htdocs/cdr/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('linkvault/front...', Array)

8 /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('linkvault/front...', Array)

9 /Applications/MAMP/htdocs/cdr/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))

10 /Applications/MAMP/htdocs/cdr/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))

11 /Applications/MAMP/htdocs/cdr/html/index.php(21): yii\base\Application->run()

12 {main}

benjaminkohl commented 4 years ago

I'm looking into this but can you double-check the plugin version. That's a non-existent plugin version.

benjaminkohl commented 4 years ago

I just released Link Vault 3.0.5.5 which fixes this issue. Thank you for bringing it to my attention.

simonkuran commented 4 years ago

That was a very fast fix! It's working now, thanks! Sorry for the wrong version number, good old copy paste error, I updated it.