# Editing runtime fields for remote index stopped working

**URL:** <https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953>\
**Category:** Kibana\
**Tags:** painless\
**Created:** [April 13, 2023, 11:49pm UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953 "2023-04-13T23:49:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erik\_n](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@erik\_n](https://discuss.elastic.co/u/erik_n)\
**Post date:** [April 13, 2023, 11:49pm UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953/1 "2023-04-13T23:49:55Z")

</div>

Hello!

I had a few runtime fields working with a cluster against data in a remote cluster, and since upgrading both from 7.15 to 8.6 I'm unable to edit them or create new ones.

I ran into this when trying to fix usages of "org.elasticsearch.script.JodaCompatibleZonedDateTime", but found myself unable to edit them - the editor always reports "script error" and won't let me save valid scripts. Other runtime fields that work still say "script error" in the Preview pane for the field. I deleted the offending JodaCompatible fields to restore discover, but I need to recreate them to fix related visualizations and I can't.

I developed correct replacements directly on the remote cluster, but copying and pasting that same script to the cluster that needs to read the data results in "script error" in the preview pane, and trying to save bring up the " Please address the highlighted errors. \* Invalid Painless script." dialog. (no errors are highlighted). The same happens with even "emit("Hello World!");"  
I've looked in kibana and both cluster's logs but can't find any errors.

Both clusters are v8.6.2 with Basic licenses.

I've looked at 8.7 release notes and don't see anything related. Of course, I easily could have missed something!

Thank you for any help on this.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [April 15, 2023, 1:43am UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953/2 "2023-04-15T01:43:45Z")

</div>

Can you bypass that by creating/updating the runtime fields via the API?

> **[Map a runtime field | Elasticsearch Guide \[8.7\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-mapping-fields.html)**

As for the error in Kibana, is there any error displayed in the browser console or in the Kibana log?

---

<div class="post-metadata">

**Author:** ![erik\_n](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@erik\_n](https://discuss.elastic.co/u/erik_n)\
**Post date:** [April 17, 2023, 9:33pm UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953/3 "2023-04-17T21:33:48Z")

</div>

There are no errors displayed or that I can find in the logs, it simply says "script error". I'm not sure how to add this via API, the docs talk about adding a runtime field to the mapping, which seems different than adding it to a data view.

---

<div class="post-metadata">

**Author:** ![erik\_n](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@erik\_n](https://discuss.elastic.co/u/erik_n)\
**Post date:** [April 17, 2023, 9:39pm UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953/4 "2023-04-17T21:39:21Z")

</div>

I certainly could change up and add these fields to my index template, but this isn't super high priority and I'd like to understand what's going on

---

<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:** [May 15, 2023, 9:40pm UTC](https://discuss.elastic.co/t/editing-runtime-fields-for-remote-index-stopped-working/329953/5 "2023-05-15T21:40:20Z")

</div>

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