Skip to content

CSV graph display in comments not loading #9903

Open
@jywarren

Description

@jywarren

This was a very obscure use case but probably affected by the new commenting code -- it looks like a pretty easy fix though, as we're mainly seeing some JS object turned directly into a string instead of some property of it being shown:

https://publiclab.org/questions/stevie/08-23-2019/what-are-best-practices-and-tools-to-help-clean-up-data-sets#c25527

image

@noi5e what do you think here?

<div class="comment-body" id="comment-body-25527">
  | <p>Hi <a href="/profile/crispinpierce">@crispinpierce</a> - are the 50 csv files each a 24-hour datalog?</p>
  |  
  | <p>I'm going to test out uploading a CSV to help debug here, too, so hang on a sec:</p>
  |  
  | <canvas class="inline-graph" id="graph-grid-49"></canvas>
  | <p class="graph-utils"><small><a href="/i/35299"><i class="fa fa-download"></i> CSV</a></small></p>
  | <style>
  | .graph-utils {
  | text-align: right;
  | }
  | .graph-utils a,
  | .graph-utils i {
  | color: #aaa;
  | }
  | </style>
  | <script>
  | (function(){
  | graphUrl("/i/35299", "graph-grid-49");
  | })()
  | </script>
  | [object Object]</p>
  |  
  | </div>
  |  
  |  

The [object Object] line seems off, but I'm not sure what's going on. Here's the code in the template:

<canvas class="inline-graph" id="<%= idName %>"></canvas>
<p class="graph-utils"><small><a href="<%= url %>"><i class="fa fa-download"></i> CSV</a></small></p>
<style>
.graph-utils {
text-align: right;
}
.graph-utils a,
.graph-utils i {
color: #aaa;
}
</style>
<script>
(function(){
graphUrl("<%= url %>", "<%= idName %>");
})()
</script>

Maybe it's trying to insert the graph but it's inserting an object instead of a DOM element? That seems plausible. Thanks @ebarry for noticing this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaScriptbugthe issue is regarding one of our programs which faces problems when a certain task is executed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions