Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.livewire returns "Component" instead of "Livewire" since v2.16.42 #5391

Closed
SebastianSchoeps opened this issue Jan 4, 2023 · 4 comments · Fixed by #5448
Closed

window.livewire returns "Component" instead of "Livewire" since v2.16.42 #5391

SebastianSchoeps opened this issue Jan 4, 2023 · 4 comments · Fixed by #5448
Assignees
Labels
bug Something isn't working unconfirmed

Comments

@SebastianSchoeps
Copy link
Contributor

SebastianSchoeps commented Jan 4, 2023

Package

filament/filament

Package Version

v2.16.42

Laravel Version

v9.46.0

Livewire Version

v2.10.8

PHP Version

PHP 8.2.0

Problem description

@this does not work anymore.

I dug into this and it seems that it's not working anymore since v2.16.42 (which I find pretty strange that it is just realized now?! Maybe I am totally wrong...).

The reason is that window.livewire returns the Component and not Livewire (just use the browser console to check). This different behavior was introduced in v2.16.41...v2.16.42. If I use a version >= 2.16.42, it works if I manually remove

x-init="this.livewire = $wire.__instance"

from the files

  • packages/admin/resources/views/components/page.blade.php
  • packages/forms/resources/views/components/actions/modal/index.blade.php
  • packages/tables/resources/views/index.blade.php (2x)

Maybe this is also related to the error reported at the end of #4880.

I could recreate this on a brand new project without any other changes - just use window.livewire at the console.

Expected behavior

window.livewire return Livewire and not Component

Steps to reproduce

  • create a new Laravel project
  • install Filament and an user
  • use window.livewire at the developer console (result: Component)
  • remove the lines mentioned above from the three files
  • use window.livewire at the developer console (result: Livewire)

Reproduction repository

https://github.com/i-guess-its-easier-to-create-this-issue-from-scratch/but-i-will-provide-a-repository-if-you-need-it

Relevant log output

No response

@SebastianSchoeps SebastianSchoeps added bug Something isn't working unconfirmed labels Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Hey @SebastianSchoeps! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Thank you for providing reproduction steps! Reopening the issue now.

@eorenstein1
Copy link

I'm having this same issue after upgrading my app's filament version from 2.16.26 to 2.16.53. Thank you for pinpointing the exact version and issue.

@danharrin
Copy link
Member

Should be fixed by #5448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants