mantisbt-plugins / Taskodrome

Interactive scrum board for Mantis bugtracker.
Apache License 2.0
37 stars 17 forks source link

Taskodrome only showing boards in "all projects" #268

Closed alehmann76 closed 1 month ago

alehmann76 commented 6 years ago

I have the problem that Taskodrom only shows the boards when i select "all projects". when i select a project, the page stays empty. in the developer console i can see an error:

plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:147 Uncaught TypeError: Cannot set property 'checked' of null at openBoard (plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:147) at onLoadOpening (plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:16) at pageOnLoad (plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:58) openBoard @ plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:147 onLoadOpening @ plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:16 pageOnLoad @ plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:58 load (async) (anonymous) @ plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:74

i think the reason can be that the checkbox is not yet created when the script tries to set a value for the box. in "all projects" i get about 400 issues and that takes probably a little bit longer, so that the box is ready. i have tested chrome, firefox and ie : all the same behaviour!

Maybe you have an idea how to fix it!?

bathie commented 5 years ago

hello, same issue for me. Any updates? Using Mantisbt 2.5.0

AuthenticEshkinKot commented 5 years ago

@alehmann76 @bathie Hello! Could you look your plugin pages (or page inspector in developer tools) for "\<input type="radio" id="radio_dg" name="group">"? Is it there?

bathie commented 5 years ago

hello @AuthenticEshkinKot , nope it is not there

bathie commented 5 years ago

@AuthenticEshkinKot any updates?

alehmann76 commented 5 years ago

@AuthenticEshkinKot in the pages folder: main.php contains

AuthenticEshkinKot commented 5 years ago

@bathie @alehmann76 Update your main.php with https://yadi.sk/d/bUEY3Xg5PKdGKw, please Did it help?

bathie commented 5 years ago

@AuthenticEshkinKot thanks for the updates, Tried it, got now another error:

common.js:54 Uncaught ReferenceError: List is not defined at HTMLDocument. (common.js:54) at i (jquery-2.2.4.min.js:2) at Object.fireWith [as resolveWith] (jquery-2.2.4.min.js:2) at Function.ready (jquery-2.2.4.min.js:2) at HTMLDocument.J (jquery-2.2.4.min.js:2) (anonymous) @ common.js:54 i @ jquery-2.2.4.min.js:2 fireWith @ jquery-2.2.4.min.js:2 ready @ jquery-2.2.4.min.js:2 J @ jquery-2.2.4.min.js:2 plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:235 getIssuesRaw: exists - true plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:237 getIssuesRaw: length - 0 plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:31 Uncaught TypeError: Cannot read property 'getAttribute' of null at getCooldownPeriod (plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:31 pageOnLoad plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:61

bathie commented 5 years ago

@AuthenticEshkinKot
weird, I used php 5.4 but I tried it on another server wich use php 7.2 and all works fine.

Do we need a recent php version to make it work?

AuthenticEshkinKot commented 5 years ago

@bathie It looks rather strange because the plugin successfully worked on php 5 some time ago. If now it doesn't then you should update your php.

bathie commented 5 years ago

@AuthenticEshkinKot thanks for your help, I finnally found the issue. it is not a php version problem but There was a php extension who was missing. Just need to install php-mbstring

AuthenticEshkinKot commented 5 years ago

@bathie Added this dependency to readme. Thanks for your research! @alehmann76 Do you have PHP mbstring installed?

alehmann76 commented 5 years ago

@AuthenticEshkinKot i think it´s installed:

 php -m | grep mbstring
mbstring
php -v
PHP 7.0.33-0ubuntu0.16.04.1 (cli) ( NTS )
AuthenticEshkinKot commented 5 years ago

@alehmann76 Could you try https://yadi.sk/d/bUEY3Xg5PKdGKw

alehmann76 commented 5 years ago

@AuthenticEshkinKot same result, not showing the content of the boards (only the top menu with status board, relationship,..) when i select a project different to "All projects" and "Gerneral" i tried Chrome,IE and Firefox and clear cache and forced reload!

AuthenticEshkinKot commented 5 years ago

@alehmann76 What messages are in console (except of those in OP)? Are there any errors in PHP log?

alehmann76 commented 5 years ago

@AuthenticEshkinKot The console shows:

Uncaught TypeError: Cannot set property 'checked' of null
    at openBoard (plugin_file.php?file=Taskodrome/scripts/grid_common_utils.js:147)
    at onLoadOpening (plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:16)
    at pageOnLoad (plugin_file.php?file=Taskodrome/scripts/on_load_opening.js:58)
irfanjunaid commented 4 years ago

Hi @AuthenticEshkinKot Saw this post while googling the same error

Uncaught TypeError: Cannot set property 'checked' of null
    at openBoard (plugin_file.php?file=Taskodrome/scripts/utils.js:20)
    at openPage (plugin_file.php?file=Taskodrome/scripts/starter.js:21)
    at pageOnLoad (plugin_file.php?file=Taskodrome/scripts/starter.js:2)
openBoard @ plugin_file.php?file=Taskodrome/scripts/utils.js:20
openPage @ plugin_file.php?file=Taskodrome/scripts/starter.js:21
pageOnLoad @ plugin_file.php?file=Taskodrome/scripts/starter.js:2
load (async)
(anonymous) @ plugin_file.php?file=Taskodrome/scripts/starter.js:12

My technical specs

OS: Ubuntu 18 PHP: 7.2 MySQL: 5.7 MantisBT: 2.23

I am facing the same issue. I can view the dashboard only when selecting all projects but not when selecting individual projects. Could you please help? Thanks!

irfanjunaid commented 4 years ago

Hey @AuthenticEshkinKot Please look into this issue as our team is specifically waiting for this feature. It would be great if all works. And I checked on the server logs and there no errors at all. Just the above error on browser console.

AuthenticEshkinKot commented 4 years ago

Hello, @irfanjunaid ! Do you have fresh installation of the plugin? Does php contain php-mbstring?

AuthenticEshkinKot commented 4 years ago

Also, could you check php logs?

irfanjunaid commented 4 years ago

Hello, @irfanjunaid ! Do you have fresh installation of the plugin? Does php contain php-mbstring?

Hi, Yes I have php-mbstring installed

[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

So far, we have been running the plain Mantis installation without any plugins and this is the first plugin. So, I would say it is the fresh installation.

Also, could you check php logs?

Yes, I have checked and there are no errors in the error.log. Only the usual access logs...

M44003 commented 4 years ago

Hello @AuthenticEshkinKot any updates about this issue ?

Maximus48p commented 2 years ago

Having an simular issue when selecting a single project;

common.js:60 Uncaught ReferenceError: List is not defined
    at HTMLDocument.<anonymous> (common.js:60)
    at i (jquery-2.2.4.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-2.2.4.min.js:2)
    at Function.ready (jquery-2.2.4.min.js:2)
    at HTMLDocument.J (jquery-2.2.4.min.js:2)

Any help is really appreciated.... thanks

Maximus48p commented 2 years ago

I solved it by adding:

        # listjs
        html_javascript_link( 'list-' . LISTJS_VERSION . '.min.js' );

to the file main.php.

But now i'm getting this error:

plugin_file.php?file=Taskodrome/scripts/utils.js:20 Uncaught TypeError: Cannot set properties of null (setting 'checked')
    at openBoard (plugin_file.php?file=Taskodrome/scripts/utils.js:20)
    at openPage (plugin_file.php?file=Taskodrome/scripts/starter.js:19)
    at pageOnLoad (plugin_file.php?file=Taskodrome/scripts/starter.js:2)
krzymianowski commented 2 years ago

I had a similar error. In my case there was a problem with access threshold. It looks like this plugin grants access based on the variable: "roadmap_view_threshold", which in my project has value: NOBODY. Just change this value or add new variable in config_inc.php, for example: $g_taskodrome_view_threshold = DEVELOPER; and replace the values in the Taskodrome\pages\main.php file

if( ALL_PROJECTS == $current_project_id ) {
    $t_project_ids_to_check = user_get_all_accessible_projects( $t_user_id, ALL_PROJECTS );
    $t_project_ids = array();
    foreach ( $t_project_ids_to_check as $current_project_id ) {
        $t_roadmap_view_access_level = config_get( 'roadmap_view_threshold', null, null, $current_project_id );
        if( access_has_project_level( $t_roadmap_view_access_level, $current_project_id ) ) {
            $t_project_ids[] = $current_project_id;
        }
    }
} else {
    access_ensure_project_level( config_get( 'roadmap_view_threshold' ), $current_project_id );
    $t_project_ids = user_get_all_accessible_subprojects( $t_user_id, $current_project_id );
    array_unshift( $t_project_ids, $current_project_id );
}

to:

if( ALL_PROJECTS == $current_project_id ) {
    $t_project_ids_to_check = user_get_all_accessible_projects( $t_user_id, ALL_PROJECTS );
    $t_project_ids = array();
    foreach ( $t_project_ids_to_check as $current_project_id ) {
        $t_roadmap_view_access_level = config_get( 'taskodrome_view_threshold', null, null, $current_project_id );
        if( access_has_project_level( $t_roadmap_view_access_level, $current_project_id ) ) {
            $t_project_ids[] = $current_project_id;
        }
    }
} else {
    access_ensure_project_level( config_get( 'taskodrome_view_threshold' ), $current_project_id );
    $t_project_ids = user_get_all_accessible_subprojects( $t_user_id, $current_project_id );
    array_unshift( $t_project_ids, $current_project_id );
}
Maximus48p commented 2 years ago

taskodrome_view_threshold

Excellent!!!! Thank you for this solution! Works perfectly.

alehmann76 commented 1 month ago

taskodrome_view_threshold

was the solution for me too!