GitHub user dosubot[bot] added a comment to the discussion: Getting while
adding filter or altering dashboard
{"message":{"json_metadata":[{"map_label_colors":["Unknown field."]}]}}
<!-- Answer -->
To resolve the "Unknown field" error related to "map_label_colors" when adding
a filter or altering a dashboard in Superset 4.1.1, you can follow these steps:
1. Ensure that you are running the same version of Superset on both the
frontend and backend of your installation, as a version mismatch can cause this
error.
2. Go to edit chart.
3. Navigate to the 'Advance' section.
4. Remove the map_label_color object.
Additionally, ensure that the `map_label_colors` field is correctly set in the
dashboard metadata. The code in
`superset-frontend/src/dashboard/components/PropertiesModal/index.tsx` shows
that `map_label_colors` is set using
`getFreshLabelsColorMapEntries(customLabelColors)`. Make sure this function is
correctly implemented and that `customLabelColors` is properly defined in your
metadata. After completing these steps, the dashboard should save successfully
<sup>[[1]](https://github.com/apache/superset/issues/32784)</sup><sup>[[2]](https://github.com/apache/superset/issues/31397)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great
Response](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=great_response)
| [Irrelevant
Answer](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=irrelevant_answer)
| [Incorrect
Sources](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=incorrect_sources)
| [Too
Verbose](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=hallucination)
| [Bug
Report](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/ed0ac2a2-0723-4637-8787-3e4b58a6d234?feedback_type=other)</sup>
GitHub link:
https://github.com/apache/superset/discussions/33014#discussioncomment-12749431
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]