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

[Bug]: AfterStateUpdated not available for every other Fileupload #17

Open
DevRaeph opened this issue Feb 22, 2024 · 9 comments
Open

[Bug]: AfterStateUpdated not available for every other Fileupload #17

DevRaeph opened this issue Feb 22, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@DevRaeph
Copy link

What happened?

I tried to use the Filament Import Action and after hours of research i found out, that with this plugin installed every "afterStateUpadated" funtion for any FileUpload is not accessible anymore.
Can you please add some functionality so that the afterStateUpdated is not overwritten by default.
For Fileuploads like csv or anything else it makes no sense at all.

How to reproduce the bug

Install the Plugin, create a ImportAction and try to import.

Package Version

1.3.1

PHP Version

8.3

Laravel Version

10.45

Which operating systems does with happen with?

macOS

Notes

No response

@DevRaeph DevRaeph added the bug Something isn't working label Feb 22, 2024
@joshembling
Copy link
Owner

@DevRaeph can you send across a demo repo please?

@DevRaeph
Copy link
Author

Sure i'll prepare one later.

@DevRaeph
Copy link
Author

@joshembling
I've created a demo repo:
https://github.com/DevRaeph/image-optimizer-import-bug

Steps to reproduce:

  • Migrate DB
  • Create User and login
  • Go to Customers -> import customers

After successfull upload the column stays empty and after selection an error occurs.
I've tracked down the root cause already:

your BaseFileUpload component overrides the afterStateUpdated method which is mandatory for the import.
The Filament CanImportRecords concern is using afterStateUpdated on line 78.

Hopefully that helps you :)

@joshembling
Copy link
Owner

@DevRaeph Your demo repo is incomplete. That is just a base Laravel install.

@DevRaeph
Copy link
Author

@joshembling I'm so sorry i forgot to push the repo. It's now updated :) Thx for checking it out :)

@craigvc
Copy link

craigvc commented Mar 9, 2024

confirmed we just hit this same issue!

@tommmoe
Copy link

tommmoe commented Mar 18, 2024

confirmed we just hit this same issue!

Thanks for the tip in discord! same issue here, hopefully it's not a huge job for you Josh! great package

@MB116
Copy link

MB116 commented Jun 25, 2024

+1

1 similar comment
@asmossunov
Copy link

+1

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

No branches or pull requests

6 participants