Bug #13218

Error when adding function related to another

Added by Mike Cantelon 3 months ago. Updated about 1 month ago.

Status:NewStart date:12/01/2019
Priority:MediumDue date:
Assignee:-% Done:


Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:


How to reproduce:

1. Purge AtoM (./symfony tools:purge --demo)
2. Log in
3. Add function of type “Subfunction” and name “Goat”
4. Add function of type “Function” and name “Animals” and in the “Relationships” area add “Goat”


A 500 HTTP error results and this error ends up in the Nginx error log:

2019/11/30 21:04:45 [error] 1488#1488: *44 FastCGI sent in stderr: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[HY000]: General error: 1364 Field 'object_id' doesn't have a default value]" while reading response header from upstream, client:, server: _, request: "POST /function/add HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.atom.sock:", host: "", referrer: ""


#1 Updated by Mike Cantelon 3 months ago

This might be similar, in terms of cause, to #13214.

#2 Updated by Mike Cantelon about 1 month ago

The problem seems to exist at lib/model/QubitObject.php in the “Save updated subject relations” code (starting at line 134 or so.

Also available in: Atom PDF