Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Graph not showing (empty box instead) #12

Open
szawadski opened this issue Aug 16, 2016 · 9 comments
Open

Graph not showing (empty box instead) #12

szawadski opened this issue Aug 16, 2016 · 9 comments

Comments

@szawadski
Copy link

Hello,

Tried your nice plugin that gives all its value to the "internal link" feature in Kanboard.
Unfortunately, no graph is showing when I launch the relation graph page related to 1 task.
I am using:

  • Kanboard 1.0.32
  • PHP 5.6
  • Kanboard is installed on the webserver of my Synology DS412+ with DSM 6.0
    Tried with different types of internal links but same problem.

Any idea of what I did wrong? Thanks in advance for your help.

Here are a few screenshots.
image
image
image

Regards,

Sébastien

@oliviermaridat
Copy link
Contributor

Any news on this issue?

@xavividal
Copy link
Owner

Sorry, I was on holidays and now I'm back.

It seems a JS error. Can you take a look to the JS console to see if there are some kind of warning or error?

@oliviermaridat
Copy link
Contributor

Yes, this is a JS error, a CSP one. But I don't understand why... Are your script loading something from the Web outside of Kanboard?
I know there is a new Plugin method to override CSP rules: https://github.com/kanboard/kanboard/blob/master/doc/plugin-overrides.markdown#override-http-content-security-policy

JS Console outputs:

Content Security Policy: the parameters of the page prevent loading of a resource at http://media/data/Web/Test/kanboard/plugins/Relationgraph/Asset/Javascript/vis/vis.js?1472643914 (« default-src http://kanboard.local »).
Content Security Policy: the parameters of the page prevent loading of a resource at http://media/data/Web/Test/kanboard/plugins/Relationgraph/Asset/Javascript/vis/vis.css?1472643914 (« style-src http://kanboard.local 'unsafe-inline' »).
Content Security Policy: the parameters of the page prevent loading of a resource at http://media/data/Web/Test/kanboard/plugins/Relationgraph/Asset/Javascript/GraphBuilder.js?1472643914 (« default-src http://kanboard.local »).

@szawadski
Copy link
Author

Hello!
Also some news on my side. Installed the plug-in on the same server but another instance of Kanboard (prod) and... it works perfectly. Nevertheless, I do not understand why it does not want to work on my test database (same config/version as the prod, except the path is /kanboard-test/ instead of /kanboard/)

Regards,

Sébastien

@Boobert
Copy link

Boobert commented Oct 5, 2016

@seccon06
Copy link

seccon06 commented Oct 8, 2016

Solved like this ....
Same problem here - the plugin worked on one installation I had done some weeks ago on another domain. Same versions, same server. I noticed the permissions where different, but amending them was not working.
So, I downloaded the working Relationship plugin and uploaded it to the installation that had the blank window.
All working now.

@ghost
Copy link

ghost commented Dec 14, 2016

We have the same problem. Was working fine until we upgraded to 1.0.35
PHP: 5.4.16, Kanboard: 1.0.35, Centos 7

Chrome console reports: Refused to load the script 'http://var/www/html/kanboard/plugins/Relationgraph/Asset/Javascript/vis/vis.js?1479719313' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

@lvic
Copy link

lvic commented Dec 22, 2016

Hello

I have a similiar problem like Boobert here (on a local installation via xampp):
Empty box instead of a graph, chrome console log shows that GET requests like http://localhost/core/kanboard/C:/xampp/htdocs/core/kanboard/plugins/Relationgraph/Asset/Javascript/vis/vis.js?1479719313 are returning errors as the path to assets obviously isn't valid.

Rendered HTML from kanboard looks like this:
image

Related PHP section should be this:
image

Somehow the path doesn't get resolved properly.
Is this js function in php above from the plugin or part of kanboard?
And which component provides this PLUGINS_DIR variable?

EDIT:
By hooking onto asset hooks in plugin initialization I was able to get it running:
image

Now I see the graph and can interact within. Awesome, thank you!

@ghost
Copy link

ghost commented Feb 22, 2017

@lvic Thanks! After these two changes the plugin works.

inful pushed a commit to inful/kanboard-plugin-relationgraph that referenced this issue Oct 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants