Describe the bug
After #2656, rrd_substitute_host_query_data function substitute graph item text_format from data_local.snmp_query_id only.
If add a COMMENT item without any associated datasource, graph will show as screenshot below.
To Reproduce
Steps to reproduce the behavior:
- Edit build-in graph template "Unix - Available Disk Space"
- Add a item as below:

- Create a graph from DataQuery "Unix - Get Mounted Partitions " under build-in device "Local Linux Machine"
- View Graph after while
- See error as screenshot below
Expected behavior
|query_xxxx| always be replaced for related data query, whatever from graph or data source.
Screenshots

Describe the bug
After #2656, rrd_substitute_host_query_data function substitute graph item text_format from data_local.snmp_query_id only.
If add a COMMENT item without any associated datasource, graph will show as screenshot below.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
|query_xxxx|always be replaced for related data query, whatever from graph or data source.Screenshots