# Can't edit Widget after rename Index Pattern

**URL:** https://discuss.elastic.co/t/cant-edit-widget-after-rename-index-pattern/281514
**Category:** Kibana
**Created:** [August 16, 2021, 8:16am UTC](https://discuss.elastic.co/t/cant-edit-widget-after-rename-index-pattern/281514 "2021-08-16T08:16:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Arethusa](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@Arethusa](https://discuss.elastic.co/u/Arethusa)
#### Post date: [August 16, 2021, 8:16am UTC](https://discuss.elastic.co/t/cant-edit-widget-after-rename-index-pattern/281514/1 "2021-08-16T08:16:33Z")

</div>

Hello,  
I am on v 7.12.0.

I observe a bug, maybe it was fix with new version but we never know.

Some one have rename one Index Pattern, and after that, I can't edit my widget to update it, I have to create new widget.

Like you see on the picture below, I don't have "Edit lens", so I can't change the Index.

![widgetbug](https://us1.discourse-cdn.com/elastic/original/3X/7/1/713c7a4f1806b3a213c7a75c8be6ef0a37218919.png)

I simplify the dahsboard :

![result](https://us1.discourse-cdn.com/elastic/original/3X/3/f/3ff9d5dd8287a2bdc3d688d1d4b82d6029cbc62b.png)

Snapshot:

`https://kibana.com:5601/app/dashboards#/view/1730c1d0-fe67-11eb-b6ea-53b512261bf2?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(attributes:(references:!((id:e9ea53a0-fb6c-11eb-b6ea-53b512261bf2,name:indexpattern-datasource-current-indexpattern,type:index-pattern),(id:e9ea53a0-fb6c-11eb-b6ea-53b512261bf2,name:indexpattern-datasource-layer-b38a3700-6249-4f83-9611-66c37cbddcab,type:index-pattern)),state:(datasourceStates:(indexpattern:(layers:(b38a3700-6249-4f83-9611-66c37cbddcab:(columnOrder:!('8097f4e1-57c7-4197-a393-4f052ee8e76f'),columns:('8097f4e1-57c7-4197-a393-4f052ee8e76f':(customLabel:!t,dataType:number,isBucketed:!f,label:hostname,operationType:cardinality,scale:ratio,sourceField:hostname.keyword)),incompleteColumns:())))),filters:!(),query:(language:kuery,query:'fields.clientid.keyword%20:%22client_id%22%20and%20hostname.keyword%20:%20*'),visualization:(accessor:'8097f4e1-57c7-4197-a393-4f052ee8e76f',layerId:b38a3700-6249-4f83-9611-66c37cbddcab)),title:'',type:lens,visualizationType:lnsMetric),enhancements:(),hidePanelTitles:!f),gridData:(h:6,i:'1bebde93-3e76-4681-98c7-d2e8ba6e83ad',w:8,x:39,y:0),panelIndex:'1bebde93-3e76-4681-98c7-d2e8ba6e83ad',title:'With%20new%20Index',type:lens,version:'7.12.0'),(embeddableConfig:(attributes:(references:!((id:'9009daf0-587e-11ea-858a-1758ba36bad8',name:indexpattern-datasource-current-indexpattern,type:index-pattern),(id:'9009daf0-587e-11ea-858a-1758ba36bad8',name:indexpattern-datasource-layer-f964d58f-70cd-497d-b3fb-6792bb4a9d06,type:index-pattern)),state:(datasourceStates:(indexpattern:(layers:(f964d58f-70cd-497d-b3fb-6792bb4a9d06:(columnOrder:!('650180a9-ef5e-41bf-8c1e-16e5be65073c'),columns:('650180a9-ef5e-41bf-8c1e-16e5be65073c':(customLabel:!t,dataType:number,isBucketed:!f,label:hostname,operationType:cardinality,scale:ratio,sourceField:hostname.keyword)),incompleteColumns:())))),filters:!(),query:(language:kuery,query:'fields.clientid.keyword%20:%22client_id%22%20'),visualization:(accessor:'650180a9-ef5e-41bf-8c1e-16e5be65073c',layerId:f964d58f-70cd-497d-b3fb-6792bb4a9d06)),title:'',type:lens,visualizationType:lnsMetric),enhancements:(),hidePanelTitles:!f),gridData:(h:6,i:d32b9668-8657-4a4c-b468-9528cda2bd1c,w:8,x:39,y:6),panelIndex:d32b9668-8657-4a4c-b468-9528cda2bd1c,title:'With%20Old%20Index,%20Can!'t%20Edit',type:lens,version:'7.12.0')),query:(language:kuery,query:'fields.clientid.keyword%20:%22client_id%22%20'),tags:!(),timeRestore:!f,title:'Dashboard%20DEBUG',viewMode:edit)`

Thank you.

---

<div class="post-metadata">

### Author: ![monfera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monfera/32/26467_2.png) [@monfera](https://discuss.elastic.co/u/monfera)
#### Post date: [August 23, 2021, 12:47pm UTC](https://discuss.elastic.co/t/cant-edit-widget-after-rename-index-pattern/281514/2 "2021-08-23T12:47:24Z")

</div>

Hello,

after consulting with the development team, one possible scenario is that the index pattern assignments were manually changed at some point, and it causes an issue now. If that's the case, then for all the visualizations, their saved obejcts should be updated to correct all the `references` they have in those visualizatons to point to the correct new saved object id.

We're also working on detaching the index pattern match string from index patterns, which, for disambiguation, are [slated to be renamed](https://github.com/elastic/kibana/issues/94244) as Data Views, but it'll be a significant time till this is done and taken advantage of for more flexible assignments in widgets

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 20, 2021, 12:47pm UTC](https://discuss.elastic.co/t/cant-edit-widget-after-rename-index-pattern/281514/3 "2021-09-20T12:47:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
