question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Template variable dependant of another template variable with "Include All option" on, causes Cannot read property 'replace' of null

See original GitHub issue

Grafana v6.6.2 (3fa63cfc34) ClickHouse datasource for Grafana 4.6+ 1.9.5

I have several dependant templating variables:

image

This one works always.

image

This one for now has “Include All option” disabled, and it works always.

image

This one works only if $CITY has “Include All option” disabled.

If variables are set as described above everything works. Select for CMTS looks like this: select distinct cmts from pre_eq.pre_eq where bulkId in (‘2020-07-10 00:00:00’) and crmCity in (‘BJELOVAR’) FORMAT JSON

If I change $CITY variable in a way to enable “Include All option”, I am getting an error: “Template variable service failed Cannot read property ‘replace’ of null”

Looks like there is a problem with interpretation of the $CITY variable when “Include All option” is selected.

Database fields are of types: ,bulkId DATETIME ,cmts String ,crmCity Nullable(String)

Is there any workaround?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
Slachcommented, Jul 15, 2020

@sundy-li quick workaround for you SELECT ... WHERE os IN ( arrayMap((x)->toString(x),${client_version}) )

0reactions
Slachcommented, Jul 22, 2020

@ghuname ok, could you close this issue and create a new issue? what you mean “template variable engine is confused”? do you mean something wrong with grafana UI or clickhouse-grafana replace template variable with wrong values?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template variable dependant of another template ... - GitHub
Template variable dependant of another template variable with "Include All option" on, causes Cannot read property 'replace' of null #232.
Read more >
Cannot read property 'replace' of null. Backbone js
Uncaught TypeError: Cannot read property 'replace' of null. this is the part of js where i think the error is occuring
Read more >
Template Variables - Datadog Docs
Template variable with several variables set. Use the template variables in individual widgets or click the Add to All option. To remove a...
Read more >
Built-in template tags and filters - Django documentation
Outputs the first argument variable that is not “false” (i.e. exists, is not empty, is not a false boolean value, and is not...
Read more >
Uncaught TypeError: Cannot read property of null - iDiallo
You are accessing a property of an object that is null. For example, document.getElementById('stuff') returns null. So adding .value will cause ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found