laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.88k stars 658 forks source link

Undefined variable $assetsAreCurrent #1441

Closed Hladenkyi closed 6 months ago

Hladenkyi commented 6 months ago

UPDATE:

[!NOTE] If u have same issue, just run php artisan view:clear.

Horizon Version

5.24.2

Laravel Version

11.7.0

PHP Version

8.3.6

Redis Driver

Predis

Redis Version

7.2.4

Database Driver & Version

No response

Description

I have Horizon installed on a subdomain (HORIZON_DOMAIN=https://admin.site.net). Before that, my styles did not work, I decided to update to the latest version of Horizon, and now I get this error.

I cleared the cache.

Steps To Reproduce

Just updated to the latest version.

aleedksa commented 6 months ago

@Hladenkyi what was the issue, I am facing the same issue here.

chrisvasey commented 6 months ago

I am also facing this issue

BenQoder commented 6 months ago

Currently facing this issue, How did you resolve it? @Hladenkyi

aleedksa commented 6 months ago

hey, @chrisvasey and @BenQoder it was the view cache issue, as we recently updated the horizon version. You need to run php artisan view:clear and it will fix the issue. I had searched the $assetsAreCurrent in my VScode and it showed up in one of the compiled view files, that's how found out, it is the problem with view files cache.

chrisvasey commented 6 months ago

hey, @chrisvasey and @BenQoder it was the view cache issue, as we recently updated the horizon version.

You need to run php artisan view:clear and it will fix the issue.

That makes so much sense, thank you! My tired brain just rolled back the Horizon version in the end.

Will try clear cache and confirm here.

Hladenkyi commented 5 months ago

I'm sorry I didn't provide an answer right away on how to solve this issue. Yes, you do need to run php artisan view:clear.

I was running php artisan optimize:clear and it didn't do anything, eventually view:clear helped. What was strange to me was why optimize:clear didn't work, even though I ran it first, it should have cleared view as well...

chrisvasey commented 5 months ago

Can confirm php artisan clear worked for me!

njoguamos commented 5 months ago

php artisan clear worked. Thank you.