Closed chris968 closed 4 months ago
Thanks for the report @chris968, we'll look into it.
I just realized that this have an impact on creating new passwords.
My current workaround is to disable the "folders" plugin:
<?php
return [
'passbolt' => [
'plugins' => [
'folders' => [
'enabled' => false,
],
],
],
];
``
Hi @chris968 ,
it could be that during the migration from MySQL to Postgres, some folders got their id
set to null.
Could you run this query in your postgres client, to see if this is the case?
select * from folders where "id" = null;
Also this query could be interesting:
select column_name, data_type, character_maximum_length, column_default, is_nullable from INFORMATION_SCHEMA.COLUMNS where table_name = 'folders';
@pabloelcolombiano of course I can run both commands but we have no folders in our setup:
passbolt-db=> select * from folders where "id" = null;
id | name | created | modified | created_by | modified_by
----+------+---------+----------+------------+-------------
(0 rows)
passbolt-db=> select column_name, data_type, character_maximum_length, column_default, is_nullable from INFORMATION_SCHEMA.COLUMNS where table_name = 'folders';
column_name | data_type | character_maximum_length | column_default | is_nullable
-------------+--------------------------+--------------------------+----------------+-------------
created | timestamp with time zone | | | NO
modified | timestamp with time zone | | | NO
id | character | 36 | | NO
name | character varying | 256 | | NO
created_by | character | 36 | | NO
modified_by | character | 36 | | NO
(6 rows)
operator does not exist: character = uuid so the folders.id might still be of character type and not of the postgres uuid type @pabloelcolombiano
Hi @chris968 ,
thank you for the feedback, and sorry for the delay on the response. As @jsm222 mentions, we should channge the column type to uuid. It looks like one migration was not run properly. What is the output of this command?
SELECT * FROM "phinxlog" WHERE migration_name IN ('V3120MigrateASCIIFieldsEncodingFolders');
If there are no entries, I would suggest to run the migrations:
bin/cake passbolt migrate
If there is already an entry, then I would run
DELETE FROM "phinxlog" WHERE migration_name = 'V3120MigrateASCIIFieldsEncodingFolders';
and run the migrations again
bin/cake passbolt migrate
and provide us the output of the command.
Once this is done, it would be interesting to check this command again:
select column_name, data_type, character_maximum_length, column_default, is_nullable from INFORMATION_SCHEMA.COLUMNS where table_name = 'folders';
Closing this for now.
Platform info:
How to reproduce:
Create a folder through the web GUI or launching
cake passbolt cleanup
command. The web GUI throw an error 500 but the application log show the following entry:The
cake passbolt cleanup
command show another error message related to the folders table:We reproduce the issue on two distinct setups, the database have been migrated from a working MySQL one.