DB Error: constraint violation on anonymous user contribution/membership registration after 5.8.2 -> 5.9.0...
I upgraded two Joomla sites from 5.8.x to 5.9 and one of them now gives an error for anonymous contributions or membership registrations:
Error:
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
This matches a similar issue after 5.9.0 upgrade: DB Error: constraint violation on anonymous user event registration after 5.8.2 -> 5.9.0 update
I have Mail enabled. The error doesn't occur when logged in so I've matched and then enabled more permissions than the other site which works, but it makes no difference.
joomla error acl update
add a comment |
I upgraded two Joomla sites from 5.8.x to 5.9 and one of them now gives an error for anonymous contributions or membership registrations:
Error:
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
This matches a similar issue after 5.9.0 upgrade: DB Error: constraint violation on anonymous user event registration after 5.8.2 -> 5.9.0 update
I have Mail enabled. The error doesn't occur when logged in so I've matched and then enabled more permissions than the other site which works, but it makes no difference.
joomla error acl update
add a comment |
I upgraded two Joomla sites from 5.8.x to 5.9 and one of them now gives an error for anonymous contributions or membership registrations:
Error:
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
This matches a similar issue after 5.9.0 upgrade: DB Error: constraint violation on anonymous user event registration after 5.8.2 -> 5.9.0 update
I have Mail enabled. The error doesn't occur when logged in so I've matched and then enabled more permissions than the other site which works, but it makes no difference.
joomla error acl update
I upgraded two Joomla sites from 5.8.x to 5.9 and one of them now gives an error for anonymous contributions or membership registrations:
Error:
Database Error Code: Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE), 1452
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => DB Error: constraint violation
[mode] => 16
[debug_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
[to_string] => [db_error: message="DB Error: constraint violation" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation ) VALUES(0, 0, 'View') [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`zzz`.`civicrm_acl_contact_cache`, CONSTRAINT `FK_civicrm_acl_contact_cache_user_id` FOREIGN KEY (`user_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]"]
)
This matches a similar issue after 5.9.0 upgrade: DB Error: constraint violation on anonymous user event registration after 5.8.2 -> 5.9.0 update
I have Mail enabled. The error doesn't occur when logged in so I've matched and then enabled more permissions than the other site which works, but it makes no difference.
joomla error acl update
joomla error acl update
asked Jan 16 at 20:18
NicNic
34018
34018
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
This is a core bug and Eileen has send a PR for the fix. Will you be able to try by applying the patch from here?
If the patch works for you than please comment your test result on PR so that it will speed up process of merging into core and having it available in next release.
Cheers
Pradeep
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
add a comment |
This is fixed in 5.9.1 ............
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "605"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f28096%2fdb-error-constraint-violation-on-anonymous-user-contribution-membership-registr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is a core bug and Eileen has send a PR for the fix. Will you be able to try by applying the patch from here?
If the patch works for you than please comment your test result on PR so that it will speed up process of merging into core and having it available in next release.
Cheers
Pradeep
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
add a comment |
This is a core bug and Eileen has send a PR for the fix. Will you be able to try by applying the patch from here?
If the patch works for you than please comment your test result on PR so that it will speed up process of merging into core and having it available in next release.
Cheers
Pradeep
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
add a comment |
This is a core bug and Eileen has send a PR for the fix. Will you be able to try by applying the patch from here?
If the patch works for you than please comment your test result on PR so that it will speed up process of merging into core and having it available in next release.
Cheers
Pradeep
This is a core bug and Eileen has send a PR for the fix. Will you be able to try by applying the patch from here?
If the patch works for you than please comment your test result on PR so that it will speed up process of merging into core and having it available in next release.
Cheers
Pradeep
answered Jan 16 at 20:28
Pradeep NayakPradeep Nayak
11.2k1520
11.2k1520
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
add a comment |
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
Thanks alot Pradeep, that solves the issue. I've commented on the PR.
– Nic
Jan 16 at 20:58
add a comment |
This is fixed in 5.9.1 ............
add a comment |
This is fixed in 5.9.1 ............
add a comment |
This is fixed in 5.9.1 ............
This is fixed in 5.9.1 ............
answered Jan 17 at 8:18
user4278user4278
70938
70938
add a comment |
add a comment |
Thanks for contributing an answer to CiviCRM Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcivicrm.stackexchange.com%2fquestions%2f28096%2fdb-error-constraint-violation-on-anonymous-user-contribution-membership-registr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown