-
Notifications
You must be signed in to change notification settings - Fork 110
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
[Bug]: multiple types named "element_metadata_item_key_value_pair" #924
Comments
I am able to reproduce this on https://demo.pimcore.fun/admin I will attach some screenshots now, including a step-by-step guide:
|
Could it be possible it is related to this change #876 in Especially this file: https://github.com/pimcore/data-hub/pull/876/files#diff-d59aa1c799fb7e9a75e486b3dd0089320a9f1c3d4d0f4227a2185221bc30ea6d |
Ok, I did test reverting the mentioned change #876 and it fixes the error for me. Unfortunately I have no idea how to make the config-name static without producting my error. I guess that was the intention behind that PR. |
element_metadata_item_key_value_pair should only be registered once, since it is always the same type. I suppose that would be an easy fix (check if it already exists in the registry, and if so, skip registering again) |
I like the idea and it sounds good, but I don't know how to implement it. If anyone has any tips or even PR for this, I will be happy to test the change. |
Expected behavior
I expect datahub to return valid json for my query.
My example query:
Desired example response:
Actual behavior
Instead of the desired response, datahub graphql endpoint throws an error:
Keep an eye on the element_metadata_item_key_value_pair part.
Preview panel with error on demo.pimcore.fun
2024.4
: ScreenshotSteps to reproduce
See #924 (comment) below.
Additional information
I saw this thread (#836) which is similar to my problem, but the error message is slighly different. Therefore I create a new issue.Probably not related.This issue suddenly started happening for us today. We never had this problem before. I guess it is related to our Pimcore update. We updated to the latest version 11.5.0 with datahub 1.9.0. We were many versions behind before we applied this update. I think the our last tested and working version was 1.6.3. So my guess is there was a change inbetween these versions.
We have multiple graphql endpoints configured in datahub. Not all graphql endpoints throw this error, just a single one.
I did some digging:
This query does not work -> has spread operator:
Does work -> no spread operator:
But I cannot omit these spread operators, because I require that data for our frontend to work.
What I did is: I checked the defined query schema for each object type that is in use in my endpoint. One of my fields seems to cause the issue. When I remove this field from the schema the error is gone.
The broken field in my case is called
technicalData
and has the type advanced many-to-many object relation.Maybe the reason is somehow related to the field type? It happens when this field is used for two different object types in the same query schema.
Interesting: You can see the error get's thrown even though I don't use the broken field in my query.
For me the problem appear in
dev
andproduction
mode.The text was updated successfully, but these errors were encountered: