# Custom plugin error

**URL:** <https://discuss.elastic.co/t/custom-plugin-error/79298>\
**Category:** Kibana\
**Created:** [March 20, 2017, 5:49pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298 "2017-03-20T17:49:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [March 20, 2017, 5:49pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/1 "2017-03-20T17:49:51Z")

</div>

Hello,  
I'm a beginner programmer and I don't quite understand whyb I'm getting a certain error. I wanted to be able to input html/javascript on my dashboard for a custom application and so the easiest way I found was by following these instructions and editing the markdown widget source code: [Embedding Javascript and HTML into Kibana 5.x – David Vassallo's Blog](http://blog.davidvassallo.me/2016/11/22/embedding-javascript-and-html-into-kibana-5-x/)

Everything works fine except sometimes when I try and add the markdown widget to a dashboard I get this error:

> Error: Uncaught TypeError: Cannot read property 'col' of undefined ([http://XXXXX:5601/app/kibana#/dashboard?\_g=(refreshInterval:('$$hashKey':'object:312',display:'10%20seconds',pause:!f,section:1,value:10000),time:(from:now-7d,mode:quick,to:now)](http://XXXXX:5601/app/kibana#/dashboard?_g=(refreshInterval:('$$hashKey':'object:312',display:'10%20seconds',pause:!f,section:1,value:10000),time:(from:now-7d,mode:quick,to:now)))&\_a=(filters:!(),options:(darkTheme:!f),panels:!(),query:(query\_string:(query:'\*')),title:'New%20Dashboard',uiState:()):1301)

> **at window.onerror ([http://XXXXX:5601/bundles/commons.bundle.js?v=14588:69:13503](http://XXXXX:5601/bundles/commons.bundle.js?v=14588:69:13503))**

Can anyone point me on why I'm getting this error? Why is my 'col' undefined? I really need to use custom JS/HTML for my dash so I hope someone can help me out with this!

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [March 21, 2017, 2:08pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/2 "2017-03-21T14:08:39Z")

</div>

Is editing the source code in my kibana a no no? hehe 😅

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [March 22, 2017, 5:45pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/3 "2017-03-22T17:45:29Z")

</div>

After some more time, I'm finding that just changing that tiny bit of code is making the whole functionality of Kibana mess up. Even when making a dashbaord with visuals that have nothing to do with the plugin I created, I get the same error. Specifically when I press add and select a visualization to put onto the dashboard. Or when I create a dashboard and recently had created a visualization (again, one that has nothing to do with the plugin) and try to change anything about the dashboard (add or save the dashbaord) I get this error.

My version of Kibana is 5.1.2. Can someone help me understand?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [March 22, 2017, 7:26pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/4 "2017-03-22T19:26:21Z")

</div>

Instead of modifying the markdown visualization, I would recommend building an actual plugin that defines a new visualization type. You can read up on some information about building plugins here [https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html](https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html)

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [March 23, 2017, 9:15am UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/5 "2017-03-23T09:15:09Z")

</div>

Yeah, I'm trying to work my way up to that, but because of a time constraint I need a quicker fix. Although the prospect of writing my own plugins excites me!!

Do you have any idea what this undefined "col" that the error is referring to?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [March 27, 2017, 3:17pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/6 "2017-03-27T15:17:17Z")

</div>

Sorry, I'm not sure. I'd suggest grabbing the source from [https://github.com/elastic/kibana](https://github.com/elastic/kibana), try making your edits in the source, and then run Kibana in dev mode with `npm start`. You'll get source maps that will make debugging the issue easier using your browser's dev tools.

---

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [March 27, 2017, 3:30pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/7 "2017-03-27T15:30:56Z")

</div>

Great, thanks for the response 🙂

---

<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:** [April 24, 2017, 3:31pm UTC](https://discuss.elastic.co/t/custom-plugin-error/79298/8 "2017-04-24T15:31:07Z")

</div>

Closed on April 24, 2017, 3:31pm UTC

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