Bug #12709

Error when creating new description or actor with access point terms

Added by Steve Breker almost 2 years ago. Updated 5 months ago.

Status:VerifiedStart date:01/14/2019
Priority:HighDue date:
Assignee:Peter Van Garderen% Done:

0%

Category:Taxonomy / TermEstimated time:16.00 hours
Target version:Release 2.6.0
Google Code Legacy ID: Tested version:2.6
Sponsored:Yes Requires documentation:

Description

An issue has come up where users receive a 500 error in the WebUI when creating a new description or new actor object with exactly 2 access point terms. The access point terms must both be new also, and not yet exist in the AtoM system.

The error that is recorded in the log is:

Jan 08 16:21:13 symfony [err] {PropelException} 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)]

This was reported in qa/2.5.x when testing the actor access points feature but was also reported in a stable/2.4.1 demo system.

Screen Shot 1.png (168 KB) Steve Breker, 01/14/2019 06:13 PM

Screen Shot 2.png (409 KB) Steve Breker, 01/14/2019 06:13 PM


Related issues

Related to Access to Memory (AtoM) - Feature #12647: Add subject and place access points to authority records Verified 11/27/2018
Related to Access to Memory (AtoM) - Bug #13342: Problem: Adding Actor relationships via GUI is no longer ... Verified 06/03/2020

History

#2 Updated by Steve Breker almost 2 years ago

When I create a new actor and supply two new subject access point terms that do not yet exist in the system, one of the terms will not be in the header data when the form is posted - but it have added the 'term/add' uri to the subjectAccessPoint array instead.

It is seemingly random, and happens for IO access points too. It seems more likely to occur with actors for some reason.
It only happens when there are two NEW same-type access point terms being added to a new actor it seems

See attached screenshots showing the access point terms prior to pressing the create button, and the second showing the 500 error and the resulting header data for the subject access point array. When the header data includes the 'term/add' uri, the term will not be created and the 500 error comes from the creation of the relation without a term.

#3 Updated by Dan Gillean over 1 year ago

  • Related to Feature #12647: Add subject and place access points to authority records added

#4 Updated by David Juhasz over 1 year ago

  • Description updated (diff)

#5 Updated by David Juhasz over 1 year ago

  • Category set to Taxonomy / Term
  • Assignee set to José Raddaoui Marín

Radda, when you have some time could you please investigate this issue, and see if you can provide an estimate for fixing it? Please only spend 1-2 hours on this investigation, and let me know if that's not sufficient to provide a work estimate.

#6 Updated by José Raddaoui Marín over 1 year ago

  • Assignee changed from José Raddaoui Marín to David Juhasz

Hi David, this seems to be related to the "autocomplete.js" code, when the multiple option is selected. It's hard to narrow the time to fix it, so I'd say that it may take between 2 and 8 hours.

#7 Updated by David Juhasz over 1 year ago

  • Assignee changed from David Juhasz to Dan Gillean
  • Estimated time set to 16.00

#9 Updated by David Juhasz over 1 year ago

Corinne Rogers Mar 19 at 9:09 AM:

I am not able to recreate this problem - have added two new authority records with exactly two new subject access points.

#10 Updated by Peter Van Garderen 7 months ago

  • Assignee changed from Dan Gillean to Mike Cantelon
  • Priority changed from Medium to High
  • Target version set to Release 2.6.0
  • Sponsored changed from No to Yes

This bug fix is now client sponsored. Additional description of expected fix:

    Feature: Add new Authority record with new access points
    Given: A new Authority record is created with more than one access point         
         which do not yet exist in AtoM

    When: I save the new Authority record
    Then: The new access points are saved in AtoM and linked to the Authority 
        record

#11 Updated by David Juhasz 6 months ago

  • Assignee changed from Mike Cantelon to David Juhasz

#12 Updated by David Juhasz 5 months ago

  • Status changed from New to In progress

#13 Updated by José Raddaoui Marín 5 months ago

  • Status changed from In progress to Code Review
  • Assignee changed from David Juhasz to José Raddaoui Marín

#14 Updated by José Raddaoui Marín 5 months ago

Hi David, is this ready for code review? I saw the PR with the nice description and I thought it was, but I just noticed that you have not requested review anywhere yet.

#15 Updated by José Raddaoui Marín 5 months ago

  • Status changed from Code Review to In progress
  • Assignee changed from José Raddaoui Marín to David Juhasz

#16 Updated by David Juhasz 5 months ago

  • Status changed from In progress to Code Review
  • Assignee changed from David Juhasz to José Raddaoui Marín

Hi Radda, yes it's ready for code review. I didn't request a CR on Friday because most devs were already gone for the weekend. :)

#17 Updated by José Raddaoui Marín 5 months ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to David Juhasz

Hi David, I tested the PR's branch the other day and I had the deadlock/transaction problems we were talking in the backlog grooming today. I think we should investigate the transaction retry and/or the sequential submission of the autocomplete iframes to address this issue.

#18 Updated by David Juhasz 5 months ago

Sure, sounds good Radda - I'll work on the transaction deadlock problem.

#19 Updated by David Juhasz 5 months ago

  • Status changed from Feedback to Code Review
  • Assignee deleted (David Juhasz)

#20 Updated by David Juhasz 5 months ago

  • Status changed from Code Review to QA/Review
  • Assignee set to Peter Van Garderen

#21 Updated by Peter Van Garderen 5 months ago

  • Status changed from QA/Review to Verified
  • Tested version 2.6 added

Fixed!

#22 Updated by Peter Van Garderen 4 months ago

  • Related to Bug #13342: Problem: Adding Actor relationships via GUI is no longer working added

Also available in: Atom PDF