govCMS / govcms-ckan

A Drupal 7 module to integrate with CKAN datasources such as data.gov.au and create visualisations
https://www.drupal.org/project/govcms_ckan
6 stars 8 forks source link

dataset_url in the WYSIWYG media output #96

Closed kurtfoster closed 7 years ago

kurtfoster commented 7 years ago

@jeremy-doghouse, @srowlands There appears to be a change that adds a parameter 'dataset_url' to the media entity json within the WYSIWYG, this wasn't there on the live site with the old graphs. No matter what value I put in here the graph is being removed from the output entirely, I removed WYSIWYG filter to see if there was a filter removing it, but this had no effect. If I remove it entirely, the graph appears as it should. I have just started to see where this is added in code, but any pointers would be welcome.

Here's the json if it helps:

[  
   [  
      {  
         "fid":"726",
         "view_mode":"default",
         "fields":{  
            "format":"default",
            "dataset_url":"https://www.data.vic.gov.au/data/dataset/package/resource/59588565-fd13-4c91-b90d-07339d2081b5",
            "ckan_visualisation[und][0][config][visualisation]":"bar_chart",
            "ckan_visualisation[und][0][config][visualisation_config][ckan_filters][search]":"Net debt to GSP",
            "ckan_visualisation[und][0][config][visualisation_config][ckan_filters][filters]":"",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2015-16]":"2015-16",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2016-17]":"2016-17",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2017-18]":"2017-18",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2018-19]":"2018-19",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2019-20]":"2019-20",
            "ckan_visualisation[und][0][config][visualisation_config][keys][2020-21]":"2020-21",
            "ckan_visualisation[und][0][config][visualisation_config][labels]":"Financial Management",
            "ckan_visualisation[und][0][config][visualisation_config][x_axis_grouping]":"values",
            "ckan_visualisation[und][0][config][visualisation_config][split]":"",
            "ckan_visualisation[und][0][config][visualisation_config][cache_ttl]":"global",
            "ckan_visualisation[und][0][config][visualisation_config][column_overrides][Operating Surplus]":"",
            "ckan_visualisation[und][0][config][visualisation_config][column_overrides][Net Debt to GSP]":"",
            "ckan_visualisation[und][0][config][visualisation_config][label_settings][overrides]":"",
            "ckan_visualisation[und][0][config][visualisation_config][key_defaults]":"1",
            "ckan_visualisation[und][0][config][visualisation_config][rotated]":"false",
            "ckan_visualisation[und][0][config][visualisation_config][x_label]":"",
            "ckan_visualisation[und][0][config][visualisation_config][y_label]":"per cent",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_tick_count]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_tick_cull]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_tick_values]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_tick_value_format]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_type]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_width]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_date_format][input]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_date_format][output]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_padding][left]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][x_padding][right]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_tick_count]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_tick_values]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_tick_value_format]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_rounding]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_padding][top]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][y_padding][bottom]":"",
            "ckan_visualisation[und][0][config][visualisation_config][axis_settings][tick_visibility]":"show",
            "ckan_visualisation[und][0][config][visualisation_config][grid]":"",
            "ckan_visualisation[und][0][config][visualisation_config][grid_lines][lines][0][axis]":"y",
            "ckan_visualisation[und][0][config][visualisation_config][grid_lines][lines][0][value]":"",
            "ckan_visualisation[und][0][config][visualisation_config][grid_lines][lines][0][text]":"",
            "ckan_visualisation[und][0][config][visualisation_config][grid_lines][lines][0][position]":"end",
            "ckan_visualisation[und][0][config][visualisation_config][grid_lines][lines][0][class]":"",
            "ckan_visualisation[und][0][config][visualisation_config][show_title]":"1",
            "ckan_visualisation[und][0][config][visualisation_config][palette_override]":"821714,c99c8e",
            "ckan_visualisation[und][0][config][visualisation_config][chart_padding][top]":"",
            "ckan_visualisation[und][0][config][visualisation_config][chart_padding][right]":"",
            "ckan_visualisation[und][0][config][visualisation_config][chart_padding][bottom]":"",
            "ckan_visualisation[und][0][config][visualisation_config][chart_padding][left]":"",
            "ckan_visualisation[und][0][config][visualisation_config][chart_size][height]":"",
            "ckan_visualisation[und][0][config][visualisation_config][chart_size][width]":"",
            "ckan_visualisation[und][0][config][visualisation_config][show_labels]":"1",
            "ckan_visualisation[und][0][config][visualisation_config][bar_width]":"0.5",
            "ckan_visualisation[und][0][config][visualisation_config][bar_width_override]":"6",
            "ckan_visualisation[und][0][config][visualisation_config][data_order]":"desc"
         },
         "type":"media",
         "attributes":{  
            "class":"file file-default media-element"
         },
         "link_text":"Net debt to GSP 2017-18"
      }
   ]
]
jeremy-doghouse commented 7 years ago

Hey @kurtsalsa could that be a conflict with the link filter, ie the url gets turned into a link? Can you test with link filter disabled?

kurtfoster commented 7 years ago

@jeremy-doghouse PEBCAK. thx.