# Kibana visualizations broken after deleting index pattern - modifying object does not work

**URL:** <https://discuss.elastic.co/t/kibana-visualizations-broken-after-deleting-index-pattern-modifying-object-does-not-work/237088>\
**Category:** Kibana\
**Created:** [June 15, 2020, 8:25am UTC](https://discuss.elastic.co/t/kibana-visualizations-broken-after-deleting-index-pattern-modifying-object-does-not-work/237088 "2020-06-15T08:25:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mujina93](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@mujina93](https://discuss.elastic.co/u/mujina93)\
**Post date:** [June 16, 2020, 8:25am UTC](https://discuss.elastic.co/t/kibana-visualizations-broken-after-deleting-index-pattern-modifying-object-does-not-work/237088/4 "2020-06-16T08:25:26Z")

</div>

_(I will **bold** my questions hereafter, so that they are easy to notice)_

Thanks, what I did was indeed creating some new visualizations, exporting them, inspecting the ndjson, finding the `reference` field(s), copying the content and pasting inside the `reference` array (as suggested in the [managing-saved-objects-in-kibana-7.7](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html#managing-saved-objects-object-definition) guide) in the edit object view in Kibana. Much like what is suggested in [change-visualization-index-under-saved-objects](https://discuss.elastic.co/t/change-visualization-index-under-saved-objects/188578).

Modifying the `index` field under kibanaSavedObjectMeta.searchSourceJSON as suggested in [visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists](https://discuss.elastic.co/t/visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists/181452) is something which apparently is valid for kibana 6.8, judging by the part at the end in the guide [managing-saved-objects-in-kibana-6.8](https://www.elastic.co/guide/en/kibana/6.8/managing-saved-objects.html#managing-saved-objects-object-definition).

However I still had to put my index's uuid in the `reference`, which [visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists](https://discuss.elastic.co/t/visualizations-broken-after-deleting-index-pattern-resolved-the-index-pattern-associated-with-this-object-no-longer-exists/181452) suggests to take from the link to the index page under index management in kibana.

My problem was that I didn't have a simple single-object and easy-to-guess reference that could be solved just with a new index uuid. For example, I had a Control kind of visualization that required 3 entries in the `reference` array, each with a custom name. And I couldn't have guessed the exact required structure and naming just by looking at what is provided in the Edit Visualization view (Saved Objects \> Inspect) alone, since when I edit objects (also valid and new ones!) from there, the `reference` entry is always empty.

I don't see why it should be like that, since when one then goes the more laborious way of downloading the `export.ndarray`, the `reference` can be found.

**Why isn't all the information present in Kibana's view for editing objects?**

Anyway, my question remains:

**is there a way of debugging such issues?**

Unfortunately, when a visualization is broken, it just doesn't show up (can't be visualized), and it does so silently. Even the guide [managing-saved-objects-in-kibana-7.7](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html#managing-saved-objects-object-definition) warns you at the end about the fact that even a little change might render the visualization unusable, and that manual editing should be avoided:

> Validation is not performed for object properties. Submitting an invalid change will render the object unusable.

But what about the cases when I _must_ edit manually? Is there a way to discover if it's a wrong type in one field, if it's wrong syntax, if it's a missing index's uuid, or wrong number of entries or format in the reference or in other fields?

And a final question related to this topic, which I ask in advance so that it won't bite me:

**if I now introduce index aliases (I need rollover on my index), or change index name or index pattern name, or I change some field's meta-information (like `index` or `type` or `keyword`), what's the correct and cleanest way of propagating this change to my visualizations?**  
**Can I do something in advance?** (For example, I don't see any button or field to change the index pattern when I edit a visualization in the proper "UI" way)  
**Or will I have to go through this process of blind trial and error via manual editing of the saved object?** (Now I know how to do it but it's a bit time consuming and error-prone).

Thanks for your support and thank you again for your quick answers!

---

_[View the full topic](https://discuss.elastic.co/t/kibana-visualizations-broken-after-deleting-index-pattern-modifying-object-does-not-work/237088)._
