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

Unable to use Field BelongsTo type. Getting 404 error #8

Open
mlordi opened this issue May 6, 2024 · 5 comments
Open

Unable to use Field BelongsTo type. Getting 404 error #8

mlordi opened this issue May 6, 2024 · 5 comments

Comments

@mlordi
Copy link

mlordi commented May 6, 2024

Whenever I use the Field type of BelongsTo::make('Customer', 'user', 'App\Nova\User') I am getting a 404 error. If I change it to Text::make('Customer', 'user') it works just fine. What am I missing?

@Olejs
Copy link

Olejs commented Jun 21, 2024

I have the same problem

@quentinlecler
Copy link

quentinlecler commented Dec 13, 2024

Same here

The field:
BelongsTo::make(__('Formulaire'), 'formulaire', \App\Nova\FormulaireTemplate::class) ->required() ->hideFromIndex() ->help(Tools::renderFormulaireThumbnails()),

The error:
AxiosError: Request failed with status code 404 at Ie (https://xxx.test/vendor/nova/vendor.js?id=20f6a357bacc7e6785005cdffc885193:2:1664487) at XMLHttpRequest.g (https://xxx.test/vendor/nova/vendor.js?id=20f6a357bacc7e6785005cdffc885193:2:1669144) at yt.request (https://xxx.test/vendor/nova/vendor.js?id=20f6a357bacc7e6785005cdffc885193:2:1677025)

reload: function() { var t = this; this.loading = !0; var e = "/nova-vendor/wdelfuego/nova-wizard" + this.instanceUrl() + window.location.search; Nova.request().get(e).then((function(e) { t.reloadFromResponse(e) } )) },

@wdelfuego
Copy link
Owner

Mhm that's strange, can you share some more info about the url that is being requested that causes the 404?

All info that helps debug the issue is very welcome.

@quentinlecler
Copy link

quentinlecler commented Dec 13, 2024

Mhm that's strange, can you share some more info about the url that is being requested that causes the 404?

All info that helps debug the issue is very welcome.

I updated with more info I don't have more details about the error sadly

@quentinlecler
Copy link

I had to use the Select field instead like this :

'fields' => [ Select::make(__('xxx'), 'xxx') ->options($querySimul->pluck('title', 'id')) ->help(Tools::renderXxxThumbnails()),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants