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

Argument 1 passed to StaticResource #72

Closed
amidesfahani opened this issue Oct 11, 2020 · 3 comments
Closed

Argument 1 passed to StaticResource #72

amidesfahani opened this issue Oct 11, 2020 · 3 comments

Comments

@amidesfahani
Copy link

This error is displayed when I try to save a page

  • Laravel 8
  • Nova 3.12
Argument 1 passed to Whitecube\NovaPage\Pages\StaticResource::__construct() must be an instance of Whitecube\NovaPage\Pages\Template, instance of Whitecube\NovaPage\Pages\Manager given, called in E:\localhost\www\projects\shaparak\laravel8\nova\src\Http\Requests\InteractsWithResources.php on line 65
@amidesfahani
Copy link
Author

problem is trix withFiles:

Trix::make(__('Body'), 'body')->withFiles('public')

@BenSampo
Copy link
Contributor

BenSampo commented Apr 1, 2021

For me this was caused by route caching as per #64. The solution is to disable route caching until there's a fix.

@keizah7
Copy link

keizah7 commented Jan 3, 2022

I have this issue with route caching

[2022-01-03 10:33:17] local.ERROR: Whitecube\NovaPage\Pages\StaticResource::__construct(): Argument #1 ($resource) must be of type Whitecube\NovaPage\Pages\Template, Whitecube\NovaPage\Pages\Manager given, called in /Users/arturas/code/Freelance/jammi/nova/src/Http/Requests/InteractsWithResources.php on line 65 {"userId":9,"exception":"[object] (TypeError(code: 0): Whitecube\\NovaPage\\Pages\\StaticResource::__construct(): Argument #1 ($resource) must be of type Whitecube\\NovaPage\\Pages\\Template, Whitecube\\NovaPage\\Pages\\Manager given, called in /Users/arturas/code/Freelance/jammi/nova/src/Http/Requests/InteractsWithResources.php on line 65 at /Users/arturas/code/Freelance/jammi/vendor/whitecube/nova-page/src/Pages/StaticResource.php:52)
[stacktrace]
#0 /Users/arturas/code/Freelance/jammi/nova/src/Http/Requests/InteractsWithResources.php(65): Whitecube\\NovaPage\\Pages\\StaticResource->__construct(Object(Whitecube\\NovaPage\\Pages\\Manager))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants