Problem with my plugin
Moderators: Developer, Contributor
Problem with my plugin
hi, I’m coming to you because I have a migration project, from version 1.2.0 to 2.25.2, to do for my business. I managed to migrate all the data on this new version with the plugins they had. However, they created a plugins themselves that I manage to run in MantisBT except for rendering an array. My array now
In the old version, they used JQuery Librairie with DataTables and on this new version I can’t make it work. I tried to use JSTables which works on a test page that I created but not on MantisBT. This is my old painting
So, I don’t know where the problem I encounter can come from and if there is a way to solve the problem of the rendering of the painting. I am attaching a screenshot of my terminal with some errors.
xSana_83Re: Problem with my plugin
This looks to be coming from security issues. Please check your CSP headers.
Check this forum on CSP headers or google on CSP & mantisbt
There is a lot of info available.
Just be careful with removing all such policies, they are there for a reason, certainly if your mantis is available to the outside world.
Check this forum on CSP headers or google on CSP & mantisbt
There is a lot of info available.
Just be careful with removing all such policies, they are there for a reason, certainly if your mantis is available to the outside world.
Re: Problem with my plugin
So I looked my way through the CSP and changed that on the source code.
Which allowed me to run a board and also something else. However, I don’t know why it put the MantisBT tabs like this left and right.
Re: Problem with my plugin
Please do not change the values in config_defaults, make only changes in config/config_inc.php
I cannot indicate why the columns look like this, centered
I cannot indicate why the columns look like this, centered
Re: Problem with my plugin
By setting $g_custom_headers as you did (which as cas said you really should do in config_inc.php), you are completely disabling content security policy. This is a considerable security risk, particularly if your Mantis is used on the Internet, as it potentially exposes your system to all sorts of vulnerabilities (e.g. cross-site scripting). I strongly recommend you don't do that, and try to specifically adapt the policy to your specific needs instead.
You probably should adapt your custom plugin and make sure external script resources are loaded via a hook into the EVENT_LAYOUT_RESOURCES event, and update the CSP using the EVENT_CORE_HEADERS event, with appropriate calls to http_csp_add().
With regards to the messed up layout, I would guess that some of the additional CSS you're loading conflicts with the default ones.
You probably should adapt your custom plugin and make sure external script resources are loaded via a hook into the EVENT_LAYOUT_RESOURCES event, and update the CSP using the EVENT_CORE_HEADERS event, with appropriate calls to http_csp_add().
With regards to the messed up layout, I would guess that some of the additional CSS you're loading conflicts with the default ones.
Re: Problem with my plugin
Hello, I was able to succeed my project with your help. However, the company where I work have chosen to want to remove this security. So, it works as it should and for the visual, it was a problem with Bootstrap. Thank you for your help!