1

When selecting a different location for an event where this event is the only one using the current location, upon save you'll see an endless spinner.

Everything seems to get deleted just fine in the d/b (the previous location gets deleted as it's no longer needed as it was only used by one event ... that's how Civi does it, anyway), but the endless spinner in the UI is annoying and our staff get worried. ('coz, you know, we saw the recent bug where creating a new location inserted this location to all events that shared the previous location ... anyway, our staff are a little gun shy as you can imagine).

In the error log, I see the following:

[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => UPDATE  civicrm_loc_block  SET address_id = 29774 , email_id = NULL , phone_id = NULL , im_id = NULL , address_2_id = NULL , email_2_id = NULL , phone_2_id = NULL , im_2_id = NULL   WHERE (  civicrm_loc_block.id = 61 )   [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`evergr55_test`.`civicrm_loc_block`, CONSTRAINT `FK_civicrm_loc_block_address_id` FOREIGN KEY (`address_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]
[type] => DB_Error
[user_info] => UPDATE  civicrm_loc_block  SET address_id = 29774 , email_id = NULL , phone_id = NULL , im_id = NULL , address_2_id = NULL , email_2_id = NULL , phone_2_id = NULL , im_2_id = NULL   WHERE (  civicrm_loc_block.id = 61 )   [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`evergr55_test`.`civicrm_loc_block`, CONSTRAINT `FK_civicrm_loc_block_address_id` FOREIGN KEY (`address_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE  civicrm_loc_block  SET address_id = 29774 , email_id = NULL , phone_id = NULL , im_id = NULL , address_2_id = NULL , email_2_id = NULL , phone_2_id = NULL , im_2_id = NULL   WHERE (  civicrm_loc_block.id = 61 )   [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`evergr55_test`.`civicrm_loc_block`, CONSTRAINT `FK_civicrm_loc_block_address_id` FOREIGN KEY (`address_id`) REFERENCES `civicrm_address` (`id`) ON DELETE SET NULL)]"]

I was able to reproduce this on one of the demo sites (which uses Drupal; I'm seeing it on Joomla on my end).

Anyone else seen this issue? Wanted to check here before submitting an issue on Github.

Thx

  • What error are you seeing in console? Also check network tab, it should be failing on getting some resource. – Hassan Farooq Jun 13 '18 at 21:36
  • Nothing in the console or network tabs in Chrome. The screen just freezes with the Civi triangle spinner overlay. Was able to repro this on a demo site w/ CiviCRM 5.3.1; however, I think I figured out the root cause as I fixed it on our site - I'll post it as an answer – MtnPavlas Jul 26 '18 at 23:51
2

This got solved on our site on CiviCRM 5.3.1 and Joomla 3.8.10 by creating and entering a Google Geocoding API key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.