wireui / wireui

TallStack UI components
https://v1.wireui.dev
MIT License
1.37k stars 166 forks source link

Undefined variable $classes #229

Closed elfeffe closed 1 year ago

elfeffe commented 2 years ago

Describe the bug I get Undefined variable $classes Here

     <button {{ $attributes->merge([

            'class' => $classes,

            'type'  => 'button'

        ]) }}

To Reproduce I just have a button as I had before, and then I upgraded to L9, and I get the error.

mckenziearts commented 2 years ago

Screenshot from 2022-03-29 12-10-51

Any update on this ? @PH7-Jack i have the same problem

REJack commented 2 years ago

Did you both updated to wireui to v1?

mckenziearts commented 2 years ago

Yes. I updated to Laravel 9 and v1.0. And as soon as I refresh my page without touching anything I got this error

REJack commented 2 years ago

did you created a modified button class?

mckenziearts commented 2 years ago

No, I don't use button components in my application, which is what attracts my attention even more. Otherwise the button show on screen should not be displayed

It's much more on pages where I have dropdown, datepicker

REJack commented 2 years ago

the dropdown uses the buttons too, if I'm not wrong. May reset the components in the config can help.

mckenziearts commented 2 years ago

I have just started a new laravel 9 project and I don't have this error. But when you upgrade from Laravel 8 to Laravel 9 you get this error.

jcvjunior commented 1 year ago

I have the same one who noticed the problem, doing the update to laravel 9, I was using laravel 8 but the wireui version was very old (v0.11.0). Anyone any tips? I've been stuck on this problem for two days.

PH7-Jack commented 1 year ago

Hello Guys, I'm seeing it now. The button component doesn't have the $classes variable. If did you publish the resources, publish again and update your blades If you do a package upgrade, update your published views and delete your laravel cache.

https://github.com/wireui/wireui/blob/main/resources/views/components/button.blade.php

If you think that it's is really a bug, show me more details and tag me to reopen the issue

PH7-Jack commented 1 year ago

@jcvjunior @elfeffe @mckenziearts See my answer