# Vega in Kibana 6.8 | Cannot tap on a relative url in "href" | vega.enableExternalUrls | External URLs are not enabled

**URL:** <https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766>\
**Category:** Kibana\
**Created:** [July 18, 2020, 11:17pm UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766 "2020-07-18T23:17:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkhanz](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hkhanz](https://discuss.elastic.co/u/hkhanz)\
**Post date:** [July 18, 2020, 11:17pm UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/1 "2020-07-18T23:17:50Z")

</div>

I am trying to create a very simple - but ultimately super practical example - of tapping a bar segment inside a Vega visualization and being able to go to the appropriate `/discover` url for the data.

When I try to do the above I get the following error, observing the networking logs - no network request is event made:

```auto
Uncaught Error: External URLs are not enabled. Add vega.enableExternalUrls: true to kibana.yml (https://mydomain.com/searchserv-dashboard/index-name/bundles/commons.bundle.js:3)

Version: 6.8.3
Build: 20430
Error: Uncaught Error: External URLs are not enabled. Add vega.enableExternalUrls: true to kibana.yml (https://mydomain.com/searchserv-dashboard/index-name/bundles/commons.bundle.js:3)
    at window.onerror (https://mydomain.com/searchserv-dashboard/index-name/bundles/commons.bundle.js:3:967594)

```

I just want to be able to link to the **Discover** pane from this visualization, this is not an _external url_ at all, but a relative one.

Here is the json for the `mark` field I am using:

```json
{
   "marks":[
      {
         "name":"Funnel Marks",
         "type":"rect",
         "style":"bar",
         "from":{
            "data":"Custom Data"
         },
         "encode":{
            "enter":{
               "x":{
                  "scale":"xscale",
                  "field":"my_field_property"
               },
               "width":{
                  "scale":"xscale",
                  "band":1
               },
               "y":{
                  "type":"quantitative",
                  "scale":"yscale",
                  "field":"total_counts"
               },
               "y2":{
                  "scale":"yscale",
                  "value":0
               }
            },
            "update":{
               "cursor":{
                  "value":"pointer"
               },
               "href":{
                  "value":"/discover/my/relative/url"
               },
               "fill":{
                  "value":"steelblue"
               }
            },
            "hover":{
               "fill":{
                  "value":"lightblue"
               }
            }
         }
      }
   ]
}

```

Why is this not working as intended?

As I understand this, this makes Vega visualizations almost impractical as I can't drill down into the data, and this is also running on Elastic Cloud.

---

<div class="post-metadata">

**Author:** ![hkhanz](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hkhanz](https://discuss.elastic.co/u/hkhanz)\
**Post date:** [July 18, 2020, 11:27pm UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/2 "2020-07-18T23:27:38Z")

</div>

@joshdover I noticed you helped out on a similar issue here: [Dashboard links requires vega.enableExternalUrls: true](https://discuss.elastic.co/t/dashboard-links-requires-vega-enableexternalurls-true/209675)

But there was no resolution I believe

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [July 19, 2020, 12:42am UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/3 "2020-07-19T00:42:24Z")

</div>

I had the same issue and the only resolution was to add what it wants to kibana.yml that I found. Added that, restarted and works. Believe I also had to use the full URL and not just the relative too.

```auto
vega.enableExternalUrls: true

```

---

<div class="post-metadata">

**Author:** ![hkhanz](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hkhanz](https://discuss.elastic.co/u/hkhanz)\
**Post date:** [July 19, 2020, 12:53am UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/4 "2020-07-19T00:53:23Z")

</div>

Unfortunately this is not possible to do in Elastic Cloud as external urls are not permitted due to security reasons

---

<div class="post-metadata">

**Author:** ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)\
**Post date:** [July 19, 2020, 1:33am UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/5 "2020-07-19T01:33:44Z")

</div>

> [@hkhanz](#):
>
> Unfortunately this is not possible to do in Elastic Cloud as external urls are not permitted due to security reasons

Ahh got ya. I haven't used the Cloud so not sure. Have you attempted to use the full URL so it knows it's not external?

```auto
               "href":{
                  "value":"/discover/my/relative/url"
               }

```

---

<div class="post-metadata">

**Author:** ![hkhanz](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hkhanz](https://discuss.elastic.co/u/hkhanz)\
**Post date:** [July 19, 2020, 1:48am UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/6 "2020-07-19T01:48:05Z")

</div>

I did 🙂 and that does not work either, it will throw the same error.

Kibana team you should allow users to proceed with a relative url right?

I investigated the issues and it seems that it calls a function in the commons bundle, `window.onerror` and will through a fatal error without dispatching or trying a network request.

For context here is the relative url I tried, (I hard coded it in to test):

```auto
/searchserv-dashboard/index-name/app/kibana#/discover?_g=h@95vjc6b1&_a=h@2jhjjd2

```

---

<div class="post-metadata">

**Author:** ![DavidKHE](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@DavidKHE](https://discuss.elastic.co/u/DavidKHE)\
**Post date:** [July 19, 2020, 7:11am UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/7 "2020-07-19T07:11:02Z")

</div>

Are you using ES cloud? if yes. not possible. also did not get any updates when if at all this will be feasible.

But working fine if you are hosting this on AWS/GCP. we have couple clusters there it is working fine.

as workaround, at least that works for us. we loaded the external data manually and doing enrichment for the docs so we can have the information in Vega.  
important note, there are issues with enrichment processor. that should be fixed in latest version. but did not get to check in production.

---

<div class="post-metadata">

**Author:** ![hkhanz](https://avatars.discourse-cdn.com/v4/letter/h/a4c791/32.png) [@hkhanz](https://discuss.elastic.co/u/hkhanz)\
**Post date:** [July 20, 2020, 5:53pm UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/8 "2020-07-20T17:53:43Z")

</div>

> [@DavidKHE](#):
>
> But working fine if you are hosting this on AWS/GCP. we have couple clusters there it is working fine.
> 
> as workaround, at least that works for us. we loaded the external data manually and doing enrichment for the docs so we can have the information in Vega.  
> important note, there are issues with enrichment processor. that should be fixed in latest version. but did not get to check in production.

Hi @DavidKHE thanks for the explanation.

I'll verify with my team if we are on Elastic Cloud or AWS/GCP (I assumed the issues would be the same across all).

Can you clarify what you mean by this:

```auto
as workaround, at least that works for us. we loaded the external data manually and doing enrichment for the docs so we can have the information in Vega.
important note, there are issues with enrichment processor. that should be fixed in latest version. but did not get to check in production.

```

How would I follow the same setup there you listed out? ^

---

<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:** [August 17, 2020, 5:53pm UTC](https://discuss.elastic.co/t/vega-in-kibana-6-8-cannot-tap-on-a-relative-url-in-href-vega-enableexternalurls-external-urls-are-not-enabled/241766/9 "2020-08-17T17:53:51Z")

</div>

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