-
Notifications
You must be signed in to change notification settings - Fork 34
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
Navigating to resource detail page causes 404 when resource uses large id as string #5527
Comments
Can you provide a reproducing repository for this issue? and are you specify the model key type attribute to |
Here is the reproducing repository: https://github.com/nhaynes/nova-issue-5527 |
I tried making use of asBigInt on the |
@davidhemphill Will this fix be in the next release then? |
Will be available on the upcoming release. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
We have some models where we are using Snowflake IDs instead of the standard integer ids. The implementation is pretty much the same as the HasUuids option that ships with Laravel but instead of Uuids, you get snowflake ids.
This has been working well for us with Nova until the 4.24.0 update. It seems a change in that release started casting our snowflake IDs as integers and so a Snowflake ID like
171392037059436224
becomes171392037059436220
once the value is supplied to the Vue front-end. This in turn breaks the links to our resource detail pages because it's the wrong id.We've run into this ourselves and so we treat our snowflake IDs as strings in PHP and javascript code:
I did some digging around in the
vendor
folder I believe it's line 57 in theUtil.php
file that is causing the problem.Detailed steps to reproduce the issue on a fresh Nova installation:
171392037059436224
171392037059436220
as the IDThe text was updated successfully, but these errors were encountered: