Bug #11928

Error adding actor and occupations in French

Added by Mike Cantelon over 4 years ago. Updated about 3 years ago.

Status:NewStart date:01/31/2018
Priority:LowDue date:
Assignee:Mike Cantelon% Done:

0%

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

Description

This is an odd one I came across while testing something else.

Here's how I was able to reproduce it:

  1. Run tools:purge (if DB isn’t fresh)
  2. Switch to French
  3. Select “Notices d'autorité” in add content pull-down menu
  4. Select type of authority record and enter an authorized name
  5. In the “Mots-clés” section, enter an occupation and a note
  6. Enter another occupation and note
  7. Click “Sauvegarder”

A 500 error might result. If a 500 doesn’t result, try purging and going through the process again entering the same values.

History

#1 Updated by Mike Cantelon almost 4 years ago

It seems like a race condition given it happens sometimes, but not others.

Issue occurs in doInsert for queries like this:

INSERT INTO object_term_relation (`ID`,`OBJECT_ID`) VALUES (520, 518);

Error in log is like this:

2018/07/08 04:50:51 [error] 1301#1301: *1724 FastCGI sent in stderr: "PHP message: Unable to execute INSERT statement. [wrapped: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`atom`.`object_term_relation`, CONSTRAINT `object_term_relation_FK_3` FOREIGN KEY (`term_id`) REFERENCES `term` (`id`) ON DELETE CASCADE)]" while reading response header from upstream, client: 192.168.168.1, server: _, request: "POST /actor/add HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.atom.sock:", host: "192.168.168.194", referrer: "http://192.168.168.194/actor/add"

#2 Updated by Dan Gillean about 3 years ago

  • Target version deleted (Release 2.5.0)

Also available in: Atom PDF