Skip to content
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

Editing a scripted field causes errors #33251

Closed
lukasolson opened this issue Mar 14, 2019 · 3 comments
Closed

Editing a scripted field causes errors #33251

lukasolson opened this issue Mar 14, 2019 · 3 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages

Comments

@lukasolson
Copy link
Member

Steps to reproduce:

  1. Create a new scripted field (I just kept the defaults and named it "foo" and used "1" as the script)
  2. Save the scripted field
  3. Edit the scripted field (don't need to even change anything)
  4. Save the scripted field again
  5. Attempt to edit the scripted field again

You'll get a blank page and the following error in the console:

TypeError: field.format.params is not a function
    at FieldEditorComponent._callee$ (field_editor.js:153)
    at tryCatch (runtime.js:62)
    at Generator.invoke [as _invoke] (runtime.js:288)
    at Generator.prototype.(anonymous function) [as next] (webpack://%5Bname%5D/./node_modules/regenerator-runtime/runtime.js?:114:21)
    at step (field_editor.js:79)
    at eval (field_editor.js:79)

If you try to go to Discover with that index pattern selected, you'll get this error:

angular.js:14800 TypeError: field.format.getConverterFor is not a function
    at convert (_format_hit.js:38)
    at eval (_format_hit.js:57)
    at eval (index.js:3117)
    at baseForOwn (index.js:2090)
    at Function.eval [as forOwn] (index.js:3422)
    at IndexPattern.formatHit (_format_hit.js:55)
    at SourceFormat.sourceToHtml (source.js:53)
    at recurse (content_types.js:32)
    at eval (content_types.js:46)
    at convert (_format_hit.js:38)

Looks like the field formatter is not being saved the second time around, not sure exactly why.

@lukasolson lukasolson added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages labels Mar 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@lukasolson
Copy link
Member Author

Ironically, refreshing the page seems to fix the error.

@lukeelmers lukeelmers added :AppArch and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 27, 2019
@lizozom lizozom self-assigned this Apr 7, 2019
lizozom pushed a commit to lizozom/kibana that referenced this issue Apr 8, 2019
@lizozom
Copy link
Contributor

lizozom commented Apr 11, 2019

fixed by #34679

@lizozom lizozom closed this as completed Apr 11, 2019
lizozom added a commit that referenced this issue Apr 11, 2019
* Changed the default fieldFormatMap to undefined - bugfix

* Test for bug #33251

* Remove only
lizozom added a commit to lizozom/kibana that referenced this issue Apr 11, 2019
* Changed the default fieldFormatMap to undefined - bugfix

* Test for bug elastic#33251

* Remove only
lizozom added a commit that referenced this issue Apr 11, 2019
* Changed the default fieldFormatMap to undefined - bugfix

* Test for bug #33251

* Remove only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages
Projects
None yet
Development

No branches or pull requests

4 participants