Howto setup permissions for plugins dir

FYI here is the list of installed plugins:

Bigboard Calendar Customizer Gantt OAuth2 Timetrackingeditor

It may matter.

Your mounted volumes match mine in permissions:
drwxr-xr-x 4 0 0 4.0K Nov 8 2017 .
drwxr-xr-x 3 0 0 4.0K Nov 8 2017 …
drwxr-xr-x 3 100 101 4.0K Mar 29 08:00 data
drwxr-xr-x 16 100 101 4.0K Jan 14 18:15 plugins

Could you try switching to sqlite for a moment, lets rule out DB. Just change it in the config, it will reset all the stored info, but it will all return when you switch back to postgres.

After swtiched to sqlite, I could upload a new logo and it is displayed. I have also tried to upload another one and it also worked.

I cannot just replace my PostgreSQL database with a new one, because it already has live data.

This table has default id value of nextval('customizer_files_id_seq'::regclass) I would expect it to increase when a new row is inserted.

# docker exec -ti kanboard-db psql -U postgres -d kanboard
psql (10.2 (Debian 10.2-1.pgdg90+1))
Type "help" for help.

kanboard=# \d customizer_files
                                     Table "public.customizer_files"
  Column   |          Type          | Collation | Nullable |                   Default
-----------+------------------------+-----------+----------+----------------------------------------------
 id        | integer                |           | not null | nextval('customizer_files_id_seq'::regclass)
 custom_id | integer                |           | not null |
 name      | character varying(255) |           | not null |
 path      | character varying(255) |           | not null |
 is_image  | boolean                |           |          | false
 size      | integer                |           | not null | 0
 user_id   | integer                |           | not null | 0
 date      | integer                |           | not null | 0
Indexes:
    "customizer_files_pkey" PRIMARY KEY, btree (id)

kanboard=#

it deletes before it adds, not adds before it deletes.

if you don’t mind, adding it to the issue tracker, and I will look for the issue.

Okay, I’m adding it on https://github.com/creecros/Customizer

It does not matter if you delete it before adding it, or the other way. PostgreSQL sequences will always increment (by default, or decrement if you change the stepping).

Also, do you have issues with other images, outside of the plugin, like Task Images?

I know jack about PostgreSQL. You could probably figure out the issue before me :stuck_out_tongue_winking_eye:

My suggestion: if you want to use fix identifiers, then do not specify a default value for the id column at all. Just use the fixed id values everywhere.

I’m quite good with PostgreSQL (blush), I might be able to look at the code at GitHub. Just I don’t have a PHP development environment at hand.

I have tried to attach an image to a task and it did not work either.

Sorry, I’m wrong. The upload works. The download also works. But the “view” option does not work

Ok, then as I suspected. It’s not just a plugin issue, I’ve tested this in Postgres, and it worked fine, but it was a lower version, i’ll spin up that container and see what it was.

Database version: 11.1 (Debian 11.1-1.pgdg90+1)

ya, works fine.

Same address: https://projects.nachostudio.ml

admin
admin

Sorry, I was wrong. See above. The upload and the download works. But the viewer does not work.

E.g. this does not work:

?controller=FileViewerController&action=image&task_id=51&project_id=5&file_id=2

but this DOES work:

?controller=FileViewerController&action=download&task_id=51&project_id=5&file_id=2

Yes, it works there. Then it might be something with the PostgreSQL instance?

The PostgreSQL database was created with this Dockerfile:

FROM postgres:10
RUN localedef -i hu_HU -c -f UTF-8 -A /usr/share/locale/locale.alias hu_HU.UTF-8
ENV LANG hu_HU.utf8
RUN mkdir /pg_wal
RUN mkdir /backup

The locale needs to be changed in the docker file, otherwise initdb will run with the default locale. We wanted to use correct collations for our hungarian users. I doubt that this would cause any problems, but who knows. I see nothing else that is different. :frowning:

Yes, I saw, doesn’t change anything, that’s the same issue.

Neither the plugin or Kanboard can determine the File is an image.

I saw a t in the boolean of your database, I don’t know a lot about postgres, but is there a way for that to be setup as 0 or 1, instead

I ask because, every DB I look in, it shows 1, not T
image

and my memory of the code, is looking for 1…

They are all images now:

# docker exec -ti kanboard-db psql -U postgres -d kanboard
psql (10.2 (Debian 10.2-1.pgdg90+1))
Type "help" for help.

kanboard=# select * from customizer_files;
 id | custom_id |       name       |                         path                          | is_image | size | user_id |    date
----+-----------+------------------+-------------------------------------------------------+----------+------+---------+------------
 12 |         3 | nkp_logo_100.jpg | customizer/3/2bdba66919db3dc94f9f4231e11c13c7cd4f2df7 | t        | 6523 |       2 | 1553866573
 13 |         2 | favicon.png      | customizer/2/e295b88ed734a89b4185868e7f129850671c0fac | t        | 4299 |       2 | 1553866604
 14 |         1 | 100.jpg          | customizer/1/abf4e46b66d46c14bc6a942311231d3a1755b4a9 | t        | 4365 |       2 | 1553889608
(3 rows)

This link still does not work:

https://kb.nkp.uni-eszterhazy.hu/?controller=CustomizerFileController&action=image&plugin=customizer&file_id=14

I change action to download:

https://kb.nkp.uni-eszterhazy.hu/?controller=CustomizerFileController&action=download&plugin=customizer&file_id=14

then I get “Internal Error: Action not implemented”. It differs from the task attachments.

I see. In my database, customizer_files.is_image has boolean type.

The customizer plugin’s Postgresql.sql script creates it as boolean here:

The default ‘0’ value is converted to boolean false by the PostgreSQL parser. It should better be “default false”. But that is clearly not the root of the problem.

it’s not that, my Postgres DB shows the same:

kanboard=# select * from customizer_files;
 id | custom_id |                                name                                |                         path                          | is_image | size  | user_id |    date
----+-----------+--------------------------------------------------------------------+-------------------------------------------------------+----------+-------+---------+------------
  2 |         3 | nachoteam_2018-Nov-06_03-50-42PM-000_CustomizedView16830141886.png | customizer/3/d95115e5177a762cdda82396dcf8d9b0925ca4fb | t        | 37357 |       1 | 1552081474
  3 |         2 | 26339368.png                                                       | customizer/2/1ff1015f883c0fbbe8bdaf972c9630dd9995a808 | t        |  9525 |       1 | 1552081488
  4 |         1 | 100.jpg                                                            | customizer/1/ffea93dcb82b82fdbd83597727e2962ed20ebd0e | t        |  4365 |       1 | 1553893427
(3 rows)

I think here is the problem:

I believe you should simply use:

if (!$file['is_image']) {

Needs to be tested though, I’m not 100% sure that PostgreSQL PDO driver can use the native boolean type.