We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Started getting 500 error when updated packages to 3.8.3
[Fri May 17 12:09:49.839792 2024] [proxy_fcgi:error] [pid 540374:tid 140198747334400] [client 143.244.87.125:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ErrorException: Undefined property: Stancl\Tenancy\Vite::$assetPathResolver in /path/to/your/project/vendor/stancl/tenancy/src/Vite.php:18\nStack trace:\n#0 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /path/to/your/project/vendor/stancl/tenancy/src/Vite.php(18): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()\n#2 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /path/to/your/project/vendor/stancl/tenancy/src/Vite.php(18): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()\n#2 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/...'
Unknown at the moment, we use multi-tenancy and just upgraded the composer package without any code changes.
No error.
9
3.8.3
The text was updated successfully, but these errors were encountered:
Can you test the following patch?
diff --git a/vendor/stancl/tenancy/src/Vite.php b/vendor/stancl/tenancy/src/Vite.php index 1464e3a3..91ab9aad 100644 --- a/vendor/stancl/tenancy/src/Vite.php +++ b/vendor/stancl/tenancy/src/Vite.php @@ -15,6 +15,9 @@ class Vite extends BaseVite // todo move to a different directory in v4 */ protected function assetPath($path, $secure = null) { - return $this->assetPathResolver ? ($this->assetPathResolver)($path, $secure) : global_asset($path); + // In Laravel 9, the property doesn't exist. + return (isset($this->assetPathResolver) && $this->assetPathResolver) + ? ($this->assetPathResolver)($path, $secure) + : global_asset($path); } }
1221_fix.patch
Sorry, something went wrong.
The above patch does fix the issue within Laravel 9.
885179b
Thanks for the confirmation, tagging a release now.
stancl
No branches or pull requests
Bug description
Started getting 500 error when updated packages to 3.8.3
[Fri May 17 12:09:49.839792 2024] [proxy_fcgi:error] [pid 540374:tid 140198747334400] [client 143.244.87.125:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ErrorException: Undefined property: Stancl\Tenancy\Vite::$assetPathResolver in /path/to/your/project/vendor/stancl/tenancy/src/Vite.php:18\nStack trace:\n#0 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /path/to/your/project/vendor/stancl/tenancy/src/Vite.php(18): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()\n#2 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()\n#1 /path/to/your/project/vendor/stancl/tenancy/src/Vite.php(18): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}()\n#2 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php(283): Stancl\Tenancy\Vite->assetPath()\n#3 /path/to/your/project/storage/framework/views/0d81735404e0982d099e7a1fe299815bfe173fc9.php(17): Illuminate\Foundation\Vite->__invoke()\n#4 /path/to/your/project/...'
Steps to reproduce
Unknown at the moment, we use multi-tenancy and just upgraded the composer package without any code changes.
Expected behavior
No error.
Laravel version
9
stancl/tenancy version
3.8.3
The text was updated successfully, but these errors were encountered: