• csamp516

    (@csamp516)


    I tried to preview a sample chart from http://bl.ocks.org/mbostock/3943967
    but there is a PHP error:

    Warning: Invalid argument supplied for foreach() in <mysite>/wp-content/plugins/wp-d3/utils.php on line 131

    I had to wrap the aforementioned for loop with an if statement on line 131 to get it to work:
    if(is_array($includes))

    Also, the preview does not close the div tag. I added </div> right before the closing body and html tags of the last echo statement before exit().

    Lastly, I noticed I had to hit save to “preview” my chart. Is this a design feature? Isn’t a preview supposed to be something you’d look at before saving?

    https://ww.wp.xz.cn/plugins/wp-d3/

Viewing 1 replies (of 1 total)
  • Plugin Author Ruben

    (@figurebelow)

    Hi,

    Yes, because of the design you have to save the chart to be able to preview it 🙂
    The ‘preview’ side is that using the Preview feature you can view your chart before posting it.

    R.

Viewing 1 replies (of 1 total)

The topic ‘PHP Error – invalid argument for includes (invalid foreach()), can't preview’ is closed to new replies.