Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update kanbaord from 1.2.7 to 1.2.18, install Group_Assign plugin from plugin management interface, but filtering make crash the app #57

Closed
gerald2545 opened this issue Jan 4, 2021 · 29 comments

Comments

@gerald2545
Copy link

Hi
I'm using your group_assign plugin for a while.
I upgraded kanboard to 1.2.18 and reinstalled Group_assign (1.7.9 before it was 1.5.0 ).
I can still assign a task to a group, but when I want to filter the project view to display taskes assigned to a group, I get the following error on the web interface :
Internal Error: SQL Error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "" LINE 1: ...group_has_users WHERE group_has_users.user_id IN ('')) OR ta... ^

the debug trace :

[2021-01-04 08:28:02] [debug] SQL: SELECT (SELECT COUNT(*) FROM comments WHERE task_id=tasks.id) AS nb_comments, (SELECT COUNT(*) FROM task_has_files WHERE task_id=tasks.id) AS nb_files, (SELECT COUNT(*) FROM subtasks WHERE subtasks.task_id=tasks.id) AS nb_subtasks, (SELECT COUNT(*) FROM subtasks WHERE subtasks.task_id=tasks.id AND status=2) AS nb_completed_subtasks, (SELECT COUNT(*) FROM task_has_links WHERE task_has_links.task_id = tasks.id) AS nb_links, (SELECT COUNT(*) FROM task_has_external_links WHERE task_has_external_links.task_id = tasks.id) AS nb_external_links, (SELECT DISTINCT 1 FROM task_has_links WHERE task_has_links.task_id = tasks.id AND task_has_links.link_id = 9) AS is_milestone, tasks.id, tasks.reference, tasks.title, tasks.description, tasks.date_creation, tasks.date_modification, tasks.date_completed, tasks.date_started, tasks.date_due, tasks.color_id, tasks.project_id, tasks.column_id, tasks.swimlane_id, tasks.owner_id, tasks.creator_id, tasks.position, tasks.is_active, tasks.score, tasks.category_id, tasks.priority, tasks.date_moved, tasks.recurrence_status, tasks.recurrence_trigger, tasks.recurrence_factor, tasks.recurrence_timeframe, tasks.recurrence_basedate, tasks.recurrence_parent, tasks.recurrence_child, tasks.time_estimated, tasks.time_spent, users.username AS assignee_username, users.name AS assignee_name, users.email AS assignee_email, users.avatar_path AS assignee_avatar_path, project_has_categories.name AS category_name, project_has_categories.description AS category_description, project_has_categories.color_id AS category_color_id, columns.title AS column_name, columns.position AS column_position, swimlanes.name AS swimlane_name, projects.name AS project_name, tasks.owner_ms, groups.name AS assigned_groupname FROM "tasks" LEFT JOIN "users" ON "users"."id"="tasks"."owner_id" LEFT JOIN "users" AS "uc" ON "uc"."id"="tasks"."creator_id" LEFT JOIN "project_has_categories" ON "project_has_categories"."id"="tasks"."category_id" LEFT JOIN "columns" ON "columns"."id"="tasks"."column_id" LEFT JOIN "swimlanes" ON "swimlanes"."id"="tasks"."swimlane_id" LEFT JOIN "groups" ON "groups"."id"="tasks"."owner_gp" LEFT JOIN "multiselect" ON "multiselect"."id"="tasks"."owner_ms" LEFT JOIN "projects" ON "projects"."id"="tasks"."project_id"  WHERE tasks.is_active = ? AND (users.username ILIKE ? OR users.name ILIKE ? OR tasks.owner_gp IN (SELECT id FROM groups WHERE groups.name='get-plage.bioinfo') OR tasks.owner_gp IN (SELECT group_id FROM group_has_users WHERE group_has_users.user_id IN ('')) OR tasks.owner_ms IN (SELECT group_id FROM multiselect_has_users WHERE multiselect_has_users.user_id IN (''))) AND tasks.project_id = ?   ORDER BY tasks.position ASC
[2021-01-04 08:28:02] [debug] SQL: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: ""
LINE 1: ...group_has_users WHERE group_has_users.user_id IN ('')) OR ta...

any idea how to solve this error? and happy new year ;)

Gérald

@gerald2545 gerald2545 changed the title update kanbaord from 1.2.7 to 1.2.18, install Group_Assign plugin from plugin management interface, but filtering make crashing the app update kanbaord from 1.2.7 to 1.2.18, install Group_Assign plugin from plugin management interface, but filtering make crash the app Jan 4, 2021
@creecros
Copy link
Owner

creecros commented Jan 4, 2021

I'll have to investigate, didn't even know there was a new kanboard version.

your debug isn't really pointing to group assign, what other plugins are you running? have you tried removing group assign plugin, just to see if thats the actual culprit? also, when you say filter, can you describe exactly what you are doing, so I can replicate.

@gerald2545
Copy link
Author

Sorry if it was not precise. Here is a screencapture showing the problem
GIF
Cic on the group filter in the board view, select a group > error

@gerald2545
Copy link
Author

I also upgraded PHP from 5.4 to 7.4 and postgresql from 9 to 12....

@creecros
Copy link
Owner

creecros commented Jan 4, 2021

without testing, my guess is it has to do with php 7.4.

https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.core.non-array-access

@gerald2545
Copy link
Author

don't know, but the problems seems to be in TaskAllAssigneeFilter.php file
$useridsarray = $this->getSubQuery()->findAllByColumn('id');
$useridsarray does contain nothing

I never debugged kanboard source....just tried var_dump on $this->getSubQuery() but it's of no help (for me, hard to read the output), neither kanboard log not apache log

@codycolt
Copy link

codycolt commented Jan 28, 2021

Is there a solution?
Have the same problem. The plugin does not work for me.
It also no longer appears in the plugin overview.

PHP Version: 7.3.3

[Tue Jan 26 09:54:35.716213 2021] [php7:notice] [pid 10616:tid 1940] [client ::1:52517] [critical] Group_assign: Cannot override frozen service "taskFinderModel".

please fix it..... thank you

@creecros
Copy link
Owner

that seems like a different problem.

@creecros
Copy link
Owner

but I like that error code. gives me a decent idea as to what your issue is.

@creecros
Copy link
Owner

@codycolt

please make a separate issue, as this is unrelated.

when doing so confirm your kanboard configuration, i.e. version, etc...and do an actual copy and paste from your setting page.
confirm Group Assign version, and list which other plugins you have installed. Something appears to be overriding your taskFinderModel, twice. Most likely a plugin conflict with another plugin.

@codycolt
Copy link

@codycolt

please make a separate issue, as this is unrelated.

when doing so confirm your kanboard configuration, i.e. version, etc...and do an actual copy and paste from your setting page.
confirm Group Assign version, and list which other plugins you have installed. Something appears to be overriding your taskFinderModel, twice. Most likely a plugin conflict with another plugin.

so the problem is solved for me for the moment...
i just did a new installation and change my database from sqlite to mysql.
the plugin shows up in the overview again.

no errors so far... 👍

  • Application version: 1.2.18
  • PHP version: 7.3.3
  • PHP SAPI: apache2handler
  • HTTP Client: cURL
  • OS version: Windows NT 10.0
  • Database driver: mysql

image

@creecros
Copy link
Owner

@codycolt

awesome, cause I didn't really want to problem solve that 😀

@creecros
Copy link
Owner

creecros commented Feb 3, 2021

Hi
I'm using your group_assign plugin for a while.
I upgraded kanboard to 1.2.18 and reinstalled Group_assign (1.7.9 before it was 1.5.0 ).
I can still assign a task to a group, but when I want to filter the project view to display taskes assigned to a group, I get the following error on the web interface :
Internal Error: SQL Error: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type integer: "" LINE 1: ...group_has_users WHERE group_has_users.user_id IN ('')) OR ta... ^

the debug trace :

[2021-01-04 08:28:02] [debug] SQL: SELECT (SELECT COUNT(*) FROM comments WHERE task_id=tasks.id) AS nb_comments, (SELECT COUNT(*) FROM task_has_files WHERE task_id=tasks.id) AS nb_files, (SELECT COUNT(*) FROM subtasks WHERE subtasks.task_id=tasks.id) AS nb_subtasks, (SELECT COUNT(*) FROM subtasks WHERE subtasks.task_id=tasks.id AND status=2) AS nb_completed_subtasks, (SELECT COUNT(*) FROM task_has_links WHERE task_has_links.task_id = tasks.id) AS nb_links, (SELECT COUNT(*) FROM task_has_external_links WHERE task_has_external_links.task_id = tasks.id) AS nb_external_links, (SELECT DISTINCT 1 FROM task_has_links WHERE task_has_links.task_id = tasks.id AND task_has_links.link_id = 9) AS is_milestone, tasks.id, tasks.reference, tasks.title, tasks.description, tasks.date_creation, tasks.date_modification, tasks.date_completed, tasks.date_started, tasks.date_due, tasks.color_id, tasks.project_id, tasks.column_id, tasks.swimlane_id, tasks.owner_id, tasks.creator_id, tasks.position, tasks.is_active, tasks.score, tasks.category_id, tasks.priority, tasks.date_moved, tasks.recurrence_status, tasks.recurrence_trigger, tasks.recurrence_factor, tasks.recurrence_timeframe, tasks.recurrence_basedate, tasks.recurrence_parent, tasks.recurrence_child, tasks.time_estimated, tasks.time_spent, users.username AS assignee_username, users.name AS assignee_name, users.email AS assignee_email, users.avatar_path AS assignee_avatar_path, project_has_categories.name AS category_name, project_has_categories.description AS category_description, project_has_categories.color_id AS category_color_id, columns.title AS column_name, columns.position AS column_position, swimlanes.name AS swimlane_name, projects.name AS project_name, tasks.owner_ms, groups.name AS assigned_groupname FROM "tasks" LEFT JOIN "users" ON "users"."id"="tasks"."owner_id" LEFT JOIN "users" AS "uc" ON "uc"."id"="tasks"."creator_id" LEFT JOIN "project_has_categories" ON "project_has_categories"."id"="tasks"."category_id" LEFT JOIN "columns" ON "columns"."id"="tasks"."column_id" LEFT JOIN "swimlanes" ON "swimlanes"."id"="tasks"."swimlane_id" LEFT JOIN "groups" ON "groups"."id"="tasks"."owner_gp" LEFT JOIN "multiselect" ON "multiselect"."id"="tasks"."owner_ms" LEFT JOIN "projects" ON "projects"."id"="tasks"."project_id"  WHERE tasks.is_active = ? AND (users.username ILIKE ? OR users.name ILIKE ? OR tasks.owner_gp IN (SELECT id FROM groups WHERE groups.name='get-plage.bioinfo') OR tasks.owner_gp IN (SELECT group_id FROM group_has_users WHERE group_has_users.user_id IN ('')) OR tasks.owner_ms IN (SELECT group_id FROM multiselect_has_users WHERE multiselect_has_users.user_id IN (''))) AND tasks.project_id = ?   ORDER BY tasks.position ASC
[2021-01-04 08:28:02] [debug] SQL: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for type integer: ""
LINE 1: ...group_has_users WHERE group_has_users.user_id IN ('')) OR ta...

any idea how to solve this error? and happy new year ;)

Gérald

I could not duplicate this, and filter worked fine:
image

Configuration
Application version: v1.2.18
PHP version: 7.3.25
PHP SAPI: fpm-fcgi
HTTP Client: cURL
OS version: Linux 4.14.122-rancher
Database driver: sqlite
Database version: 3.32.1
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36

one day I will try with php7.4 and postgress.

@creecros
Copy link
Owner

creecros commented Feb 3, 2021

also tested with php 7.4, again no issue.

Configuration
Application version:
PHP version: 7.4.14
PHP SAPI: fpm-fcgi
HTTP Client: cURL
OS version: Linux 4.14.122-rancher
Database driver: sqlite
Database version: 3.34.1
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36

image

i will note that app version seems to be bugged here, and shows nothing...could be from creating a custom docker container using Alpine Edge, in order to get php7.4 loaded. Shouldn't matter though.
image

@creecros
Copy link
Owner

creecros commented Feb 4, 2021

and tested with postgres:
image

no issues:
image

@korlikiangel
Copy link

@creecros Can you check this out? Thanks!

@creecros
Copy link
Owner

creecros commented May 4, 2021

can you show me your exact input for the filter, and then show me your groups. just screen shot them.

@korlikiangel
Copy link

korlikiangel commented May 4, 2021

Its hard to catch the moment when filter is in search box, because the white page with the error show instantly after selecting any group.
image

image

@creecros
Copy link
Owner

creecros commented May 4, 2021

I'll take a look tomorrow.

@creecros creecros reopened this May 4, 2021
@creecros
Copy link
Owner

creecros commented May 4, 2021

@korlikiangel

out of curiosity, does the issue occur when you search for the "Traffic" group name? I'm thinking the space in the name might be the issue I need to address.

creecros added a commit that referenced this issue May 4, 2021
@creecros
Copy link
Owner

creecros commented May 4, 2021

@korlikiangel
I still cannot reproduce the error, so, based on what I see in the error code, I am taking a stab in the dark, hoping it solves the issue. Please let me know.

@korlikiangel
Copy link

Selecting the traffic filter from the filter list also gives an error.

@korlikiangel
Copy link

I noticed now that if there is no one in the group, the filter does not throw the error

@korlikiangel
Copy link

Additionally, when I get an error and change the filter name in the url link to one that does not exist, I still get the same error.
Example i changed Traffic to randomtext at the end, same error.
/?controller=BoardViewController&action=show&plugin=&project_id=1&search=status%3Aopen+allassignees%3A"randomtext"

@creecros
Copy link
Owner

creecros commented May 4, 2021

so the new code had no effect?

@korlikiangel
Copy link

I tested it now, it works, no error, thanks!

@korlikiangel
Copy link

korlikiangel commented May 5, 2021

I checked again, now there is actually no error, but when I select the filter no tasks are displayed, although there are people in those groups assigned to those tasks.

image

@creecros
Copy link
Owner

creecros commented May 5, 2021

sounds to me like you are searching for a group and expecting to find tasks individually assigned to a member in the group. take another look at the Readme. specifically:

using allassignees:GroupName (assignee:GroupName for pre 1.7.3 versions) in filter will find tasks assigned to a group by NAME of the group.
that's me trying to tell you, that's not how it works. you search for a member and it will include tasks assigned to groups that the member is in, but not vice versa.

@creecros
Copy link
Owner

creecros commented May 5, 2021

not to say that's not possible, but let's first make sure this filter works as is, before we add stuff to it.

@korlikiangel
Copy link

Sorry my bad, filters are working fine, i can filter task assigned to group.

@creecros creecros closed this as completed May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants