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

A field with the name: XX is already registered for GraphType: YY #12423

Closed
tropcicstefan opened this issue Sep 15, 2022 · 8 comments · Fixed by #16151
Closed

A field with the name: XX is already registered for GraphType: YY #12423

tropcicstefan opened this issue Sep 15, 2022 · 8 comments · Fixed by #16151

Comments

@tropcicstefan
Copy link
Contributor

tropcicstefan commented Sep 15, 2022

Describe the bug

In #8669 @deanmarcussen did some builder changes so parts that aren't collapsed don't have double field registration. The thing is, there is no check when part is collapsed. So when other builder than DynamicContentTypeBuilder already builds some of the fields there is an error of double field registration.

Expected behavior

Use already added field by changing if (fieldType != null) to if (fieldType != null && !contentItemType.HasField(fieldType .Name)

@tropcicstefan
Copy link
Contributor Author

tropcicstefan commented Sep 15, 2022

New graphql brings new behaviour

Behaviour is same, still needs a fix, I misjudged while debugging

@tropcicstefan tropcicstefan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
@tropcicstefan tropcicstefan reopened this Sep 15, 2022
@lampersky
Copy link
Contributor

@tropcicstefan could you have a look if this fix will solve your issue?

@Piedone
Copy link
Member

Piedone commented May 20, 2024

@tropcicstefan could you please confirm if #13927 fixed this issue?

@tropcicstefan
Copy link
Contributor Author

@Piedone it did fix my issue in the sense there is no exception thrown.
But it's weird that we now have double field in graphqltype for same property

made content type "test" with content part "ante" with textfield "MyProperty". Result is this image

image

@Piedone
Copy link
Member

Piedone commented May 23, 2024

@lampersky could you comment on this, please?

@lampersky
Copy link
Contributor

@Piedone I've just tried to repro, but with no luck

image

image

@Piedone
Copy link
Member

Piedone commented May 24, 2024

Thank you! @tropcicstefan could you please check the same with a fresh install, just to rule out any previously existing config issues?

@Piedone
Copy link
Member

Piedone commented May 31, 2024

If this was still a bug with main, then #16151 fixes it.

@MikeAlhayek MikeAlhayek modified the milestones: 2.x, 2.0 Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment