v2.3 500 error adding actor

103 views
Skip to first unread message

gs

unread,
Aug 15, 2016, 9:14:40 PM8/15/16
to AtoM Users
Hi Artefactual,

Our users on adding an authority record invoked a 500 internal server error and the following was in the apache error log, any suggestions?

[Mon Aug 15 17:14:24 2016] [error] [client 1.2.3.4] Unable to execute INSERT statement. [wrapped: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`archives_atom230`.`note`, CONSTRAINT `note_FK_2` FOREIGN KEY (`type_id`) REFERENCES `term` (`id`) ON DELETE SET NULL)], referer: http://2.3.4.5/index.php/actor/add

Regards,

George

gs

unread,
Aug 16, 2016, 4:29:32 AM8/16/16
to AtoM Users

Just an update.
In the interim I've dropped and re-imported the 2.2.1 DB.
Regenerated the thumbnails
Re-Indexed
and cleared the cache.

Same error.

George

Dan Gillean

unread,
Aug 16, 2016, 2:46:06 PM8/16/16
to ICA-AtoM Users
Hi George,

Thanks for this report. I will try to reproduce it locally, and will file a bug report if I'm able to recreate the error. Out of curiosity, when making the new authority record, are you attempting to create relationships to other entities (e.g. other authority records either existing or new, other descriptions, etc)? I'm wondering if it might have to do with the order of operations. Do you get this error for every attempt to create a new actor (even just a basic one with name, dates, and history, nothing else) or are there specific conditions required?

Thanks,

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-atom-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/fa58e1cb-55f7-4fd7-a2fe-178edbd099e7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Message has been deleted

gs

unread,
Aug 16, 2016, 7:52:37 PM8/16/16
to AtoM Users
Hi Dan,

Here is a comment form Sarah our user

> I've just been trying to create a very simple authority record with a name and no relationships to anything else.


and at bottom Exception output

Regards,

George

500 | Internal Server Error | 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 (`archives_atom230`.`note`, CONSTRAINT `note_FK_2` FOREIGN KEY (`type_id`) REFERENCES `term` (`id`) ON DELETE SET NULL)]

stack trace

  • at ()
    in SF_ROOT_DIR/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel/util/BasePeer.php line 299 ...

      1.         } catch (Exception $e) {
      2.             Propel::log($e->getMessage(), Propel::LOG_ERR);
      3.             throw new PropelException("Unable to execute INSERT statement."$e);
      4.         }

      5.         // If the primary key column is auto-incremented, get the id now.
  • at BasePeer::doInsert(object('Criteria'), object('PropelPDO'))
    in SF_ROOT_DIR/lib/model/om/BaseNote.php line 528 ...
  • at BaseNote->insert(null)
    in SF_ROOT_DIR/lib/model/om/BaseNote.php line 413 ...
  • at BaseNote->save(null)
    in SF_ROOT_DIR/lib/model/QubitNote.php line 41 ...
  • at QubitNote->save()
    in SF_ROOT_DIR/lib/model/QubitObject.php line 114 ...
  • at QubitObject->save(null)
    in SF_ROOT_DIR/lib/model/om/BaseActor.php line 376 ...
  • at BaseActor->save(null)
    in SF_ROOT_DIR/lib/model/QubitActor.php line 142 ...
  • at QubitActor->save()
    in SF_ROOT_DIR/apps/qubit/modules/actor/actions/editAction.class.php line 185 ...
  • at ActorEditAction->execute(object('sfWebRequest'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 92 ...
  • at sfExecutionFilter->executeAction(object('sfIsaarPluginEditAction'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 78 ...
  • at sfExecutionFilter->handleAction(object('sfFilterChain'), object('sfIsaarPluginEditAction'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 53 ...
  • at sfExecutionFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfCacheFilter.class.php line 65 ...
  • at sfCacheFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitLimitResults.class.php line 34 ...
  • at QubitLimitResults->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitMeta.class.php line 31 ...
  • at QubitMeta->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitSslRequirementFilter.class.php line 35 ...
  • at QubitSslRequirementFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitLimitIp.class.php line 39 ...
  • at QubitLimitIpFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitSettingsFilter.class.php line 64 ...
  • at QubitSettingsFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfRenderingFilter.class.php line 33 ...
  • at sfRenderingFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/plugins/sfHistoryPlugin/lib/sfHistoryPluginFilter.class.php line 18 ...
  • at sfHistoryPluginFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitTransactionFilter.class.php line 48 ...
  • at QubitTransactionFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/controller/sfController.class.php line 238 ...
  • at sfController->forward('sfIsaarPlugin', 'edit')
    in SF_ROOT_DIR/vendor/symfony/lib/controller/sfFrontWebController.class.php line 48 ...
  • at sfFrontWebController->dispatch()
    in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 170 ...
  • at sfContext->dispatch()
    in SF_ROOT_DIR/index.php line 6 ...

symfony settings ...

request ...

response ...

user ...

global vars ...

symfony v.1.4.20 - php 5.6.24
for help resolving this issue, please visit http://www.symfony-project.org/.

Dan Gillean

unread,
Aug 17, 2016, 3:02:00 PM8/17/16
to ICA-AtoM Users
Hi George,

I'm unable to reproduce this error when just adding a simple authority record (though strangely I can get a similar error when I try to add relationships to other actors during the actor creation process).

I noticed you mentioned Apache - can you tell me if there are other ways you've deviated from our recommended installation instructions that we should know about? Did you follow all the steps in the upgrading instructions?

When you cleared the cache, did you also try restarting PHP-FPM (which now maintains the opcode cache) and memcached?
  • sudo service php5-fpm restart
  • sudo service memcached restart
  • php symfony cc

You could also restart Apache for good measure.

The only other thing I can think of is that the error references a note, which is maintained in a different table. If the note type has somehow been lost or deleted from the Note types taxonomy, you might have issues. I believe that by default, there should be 11 terms included in this taxonomy


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.

GS

unread,
Aug 18, 2016, 2:30:10 AM8/18/16
to AtoM Users
Hi Dan,

Yes all services restarted, I followed the installation exactly as I normally do so I suspect it is a data issue.
I did put in a clean install without migrating the 2.2.1 DB and adding an authority worked as expected.

Regards,

George

Dan Gillean

unread,
Aug 18, 2016, 1:05:42 PM8/18/16
to ICA-AtoM Users
Hi George,

It sounds like it's a data corruption issue then. This should not occur so readily after 2.3 - we've added database transactions, so if an operation times out in the browser, the database should automatically be rolled back to the previous state.

In the meantime, there are a couple of threads that will suggest some things you can do to look for the most common causes of data corruption, if you're willing to do a bit of SQL-fu.

First, I would suggest that you rebuild the nested set, and regenerate slugs.
  • php symfony propel:build-nested-set
  • php symfony propel:generate-slugs

Docs:

The next most common case is when information objects (e.g. archival descriptions) are missing a publication status, though there are a few other possible edge cases. This thread has some tips on how to identify common causes and fix them:

I hope that helps!

Regards,


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-users+unsubscribe@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
0 new messages