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

Slug field inside tab still doesn't work #262

Open
Brand3000 opened this issue Oct 29, 2022 · 8 comments · May be fixed by #292
Open

Slug field inside tab still doesn't work #262

Brand3000 opened this issue Oct 29, 2022 · 8 comments · May be fixed by #292

Comments

@Brand3000
Copy link

Just check it

@marcfil
Copy link
Collaborator

marcfil commented Oct 29, 2022

Excuse me?

@Brand3000
Copy link
Author

When the slug field is outside of any tab, there's a preview request to the url http://usicn.localhost/nova-api/pages/field/slug/preview
However, if the slug is inside, the url is http://usicn.localhost/nova-api/undefined/field/slug/preview
undefined instead of pages

@Brand3000
Copy link
Author

You can watch a video with the issue here https://brand.dn.ua/1.html

@crynobone
Copy link
Contributor

:resource-name="field.resourceName"

Only relation fields has field.resourceName, I believe it should have use resourceName props instead but not 100% sure.

@ramonfeleus
Copy link

I am having the same issue as well. When I move the slug field + the field it is related to outside of a tab then it works.
Example field config:

Text::make(__('Title'), 'title')->rules('required'),
Slug::make(__('Slug'), 'slug')->from('title'),

This works, as long as it's not also involving nova-translatable fields, which are having a separate issue related to that plugin:
outl1ne/nova-translatable#84

@VGirol
Copy link

VGirol commented Dec 4, 2023

I'm facing the same problem. Is it possible to merge the PR #292 ?

@bigperson
Copy link

I have some problem, please merge the PR #292

@MaxKorlaar
Copy link

A temporary fix is to explicitly pass the resourceName to the field:

Slug::make('Slug', 'slug')
                            ->from('title')
                            ->withMeta([
                                'resourceName' => self::uriKey()
                            ])

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

Successfully merging a pull request may close this issue.

7 participants