whitecube / nova-page

Static pages content management for Laravel Nova
https://whitecube.github.io/nova-page
MIT License
239 stars 40 forks source link

Argument 1 passed to StaticResource #72

Closed amidesfahani closed 6 months ago

amidesfahani commented 4 years ago

This error is displayed when I try to save a page

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 commented 4 years ago

problem is trix withFiles:

Trix::make(__('Body'), 'body')->withFiles('public')
BenSampo commented 3 years ago

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

keizah7 commented 2 years ago

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))