You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When php artisan route:cache ran, it's not working:
[2020-05-19 16:22:37] production.ERROR: 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 /home/forge/foobar.nl/vendor/laravel/nova/src/Http/Requests/InteractsWithResources.php on line 65 {"userId":1,"exception":"[object] (TypeError(code: 0): 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 /home/forge/foobar.nl/vendor/laravel/nova/src/Http/Requests/InteractsWithResources.php on line 65 at /home/forge/foobar.nl/vendor/whitecube/nova-page/src/Pages/StaticResource.php:52)
[stacktrace]
[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))
I got the same problem. Why don't the creators fix this problem? You have found a solution. By clearing the cache of the mof router, the problem does not disappear
The thing is, I don't have a solution. I need it myself. How can I solve
this problem. Will you release an update or how do I work around this error?
ср, 10 авг. 2022 г. в 12:11, Adrien Leloup ***@***.***>:
@Sliper959595 there is no known solution to this problem at this time, except not using route caching. If you do find a solution or workaround, please consider sharing your findings with others in this thread, or better yet, opening a pull request with a fix. Thanks
How do I disable caching in laravel? when I reset all caches it still
doesn't work. Please tell me how I can refuse caching
ср, 10 авг. 2022 г. в 12:54, Adrien Leloup ***@***.***>:
@Sliper959595 <https://github.com/Sliper959595> there is no known
solution for this problem at this time, except not using route caching. If
you do find a solution or workaround, please consider sharing your findings
with others in this thread, or better yet, opening a pull request with a
fix. Thanks
—
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APECO7ZXZ46APSFCF3OA5ITVYN36VANCNFSM4NFBU4CA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
Curious if anyone has any idea about how to provide a longer term fix for this please? I'd like to apply route caching on my application but doing so breaks this package.
I published a fix that should have fixed this issue... At least, everything seems to be working fine on my local testing app. Could you please confirm? Thanks!
We needed a fix for this, as this library has been used extensively in one of our projects.. and we have hundreds of other routes that need to be cached.
I also couldn't locate the fix that @toonvandenbos mentioned above..
I resolved this by adding my own Middleware, instead of using Whitecube\NovaPage\Http\Middleware\LoadPageForCurrentRoute.. I duplicated the class, and replaced the handle() method with the following:
Activity
CaddyDz commentedon Jun 8, 2020
Having the same issue
CaddyDz commentedon Jun 8, 2020
Issue exists since #25
CaddyDz commentedon Jun 8, 2020
Looking at the cached routes in
bootstrap/cache/routes-v7.phpI found this
The
_routearray key should have a generate value, instead it's just the route namesimonfunk commentedon May 4, 2021
I have the same issue, is there a fix?
keizah7 commentedon Jan 3, 2022
I have this issue with route caching
arhitektorr commentedon Aug 10, 2022
I got the same problem. Why don't the creators fix this problem? You have found a solution. By clearing the cache of the mof router, the problem does not disappear

voidgraphics commentedon Aug 10, 2022
@Sliper959595 If you have a solution, please send a pull request.
arhitektorr commentedon Aug 10, 2022
voidgraphics commentedon Aug 10, 2022
@Sliper959595 there is no known solution to this problem at this time, except not using route caching. If you do find a solution or workaround, please consider sharing your findings with others in this thread, or better yet, opening a pull request with a fix. Thanks
arhitektorr commentedon Oct 11, 2022
jahvi commentedon Aug 24, 2023
As a workaround avoid caching routes for now, not ideal but at least it works.
aurelien-ci commentedon Sep 29, 2023
I have the same issue
jolora commentedon Jan 2, 2024
Curious if anyone has any idea about how to provide a longer term fix for this please? I'd like to apply route caching on my application but doing so breaks this package.
Fixed newResource calls. References #64. Closes #70, #72, #92
toonvandenbos commentedon May 13, 2024
Hello there, sorry for the delay.
I published a fix that should have fixed this issue... At least, everything seems to be working fine on my local testing app. Could you please confirm? Thanks!
brightlabscomau commentedon Nov 12, 2024
We needed a fix for this, as this library has been used extensively in one of our projects.. and we have hundreds of other routes that need to be cached.
I also couldn't locate the fix that @toonvandenbos mentioned above..
I resolved this by adding my own Middleware, instead of using
Whitecube\NovaPage\Http\Middleware\LoadPageForCurrentRoute.. I duplicated the class, and replaced the handle() method with the following: