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

Error when validating field [slug_is_key] #2

Open
DomZ3DF opened this issue Sep 9, 2024 · 12 comments
Open

Error when validating field [slug_is_key] #2

DomZ3DF opened this issue Sep 9, 2024 · 12 comments

Comments

@DomZ3DF
Copy link

DomZ3DF commented Sep 9, 2024

Hey,

I followed your tutorial on a clean directus V11.0.2 installation to check out your extension.

In my collection "pages" I let the extension create the pages_meta table and linked it.
After that, I also chose the field "Title" to be used to slugify.

Unfortunately I always receive the error message "Error when validating field [slug_is_key]" in the console.

image

image

image

image

What is the problem here?

Thank you!
Best regards
Dominik

@digital-cowboy-91
Copy link
Owner

Hi @DomZ3DF , could you please send me the message from the console as well?

@digital-cowboy-91
Copy link
Owner

digital-cowboy-91 commented Sep 9, 2024

I just tested this extension in v11.0.2 and I can replicate the issue. There seems to be a bug in Directus .If I try to create toggle field manually I cannot preset its value or force values not being null. To fix this I recommend to upgrade Directus to v 11.1.0. If you decide to go this way, let me know this suggestion works for you, I'll update docs subsequently.

@DomZ3DF
Copy link
Author

DomZ3DF commented Sep 10, 2024

I just updated to 11.1.0 but still have the same problem.
If I choose the right table, it wont load.

image

Btw: the datasets in pages_meta look empty
image
image

image

Tell me if you need anything else.
Thank you.

@digital-cowboy-91
Copy link
Owner

Did you use the collection previously created in v11.0.2 or this is a brand new one?

@DomZ3DF
Copy link
Author

DomZ3DF commented Sep 10, 2024

I deleted it and created a new pages_meta.
Pages is still the same.

@digital-cowboy-91
Copy link
Owner

What database are you using?

@DomZ3DF
Copy link
Author

DomZ3DF commented Sep 10, 2024

Percona 8.0 MySQL

@digital-cowboy-91
Copy link
Owner

Would you be able to replicate your steps on SQLite (Directs default) or PostgreSQL, please? Yesterday , I tested this extension on PostgreSQL

@digital-cowboy-91
Copy link
Owner

digital-cowboy-91 commented Sep 10, 2024

Also I just had a minute to take a look on your screenshots. The issue is different this time, which is good. Now it seems to complain about rel_item. If this is your testing database, remove please both collections and recreate pages with ID as UUID.

Edit: you don't have to remove your main collection of you don't want to, you can create a new one just for this test.

@DomZ3DF
Copy link
Author

DomZ3DF commented Sep 10, 2024

I can set it up later with SQLite or Postgre.

I created pages with a UUID and let your extension create the pages_meta table, but still the same error message like in the images before.

@digital-cowboy-91
Copy link
Owner

Thanks, at least the issue is consistent. I'll try to spin up container with MySQL later today

@digital-cowboy-91
Copy link
Owner

digital-cowboy-91 commented Sep 10, 2024

Hi, I just want to let you know, I was able to replicate the issue in Percona v8.0. Currently I can't give you an estimate when the fix will come. I will have time to look at this issue probably this weekend. Till then, I recommend you to use Postgres or SQLite (unless you will be able to replicate the issue there as well of course).

Update: This behaviour seems to be a bug in Directus directus/directus#22855 , hence I will not be proceeding with a fix yet

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

2 participants