laravel/horizon

Undefined variable $assetsAreCurrent

Hladenkyi opened this issue ยท 8 comments

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.

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

I am also facing this issue

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

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.

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.

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

Can confirm php artisan clear worked for me!

php artisan clear worked. Thank you.