cerebrate-project / cerebrate

Cerebrate is an open-source platform meant to act as a trusted contact information provider and interconnection orchestrator for other security tools.
https://www.cerebrate-project.org/
GNU Affero General Public License v3.0
82 stars 16 forks source link

Error we get when we try to “Update non-conflicting” metaTemplate that contains conflicts #148

Open jacobkarapatakis opened 1 year ago

jacobkarapatakis commented 1 year ago

When we edit a metaTemplate configuration/definition and go to the page https://cerebrate.fqdn/metaTemplates/view/203# to view it, the system shows us three options: i) Delete conflicting fields, ii) Create new template iii) Update non-conflicting

when we select “Update non-conflicting”, the system throws an error: ` 2023-03-01 00:00:00 error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'meta_template_directory_id' doesn't have a default value in /var/www/cerebrate/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php on line 39 Stack Trace:

Request URL: /metaTemplates/update/203 Referer URL: https://cerebrate.melicertes.eu/metaTemplates/view/203 Client IP: 192.168.0.252 `

mokaddem commented 1 year ago

Tried to replicate the issue on develop but didn't manage to. Could you provide the following information to help me debug this issue?

  1. Commit ID of the instance
  2. The dump of the template you are trying to update /metaTemplates/view/[template_id].json
  3. The dump of the new template you are trying to update to (located on the disk)
  4. The dump of all the known template /metaTemplateNameDirectory/index.json
  5. The log entry indicating the reason of the fail save (starts with Could not save meta_template_directory. Reasons:)

Thanks in advance!