Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Afform: Fix broken syntax for saving reciprocal relationships #25620

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

mattwire
Copy link
Contributor

Overview

The syntax for saving reciprocal relationships is wrong and API4 fails (with 500 internal server error) on form submission if you have a relationship of that type on the form.

Before

Form submission fails with 500 internal server error if you have reciprocal relationship on the form.

After

Form submission succeeds - relationship is saved!

Technical Details

After inserting a bunch of debug statements I narrowed down the issue to the processRelationships() function and then the API4 syntax. Comparing with API4 explorer shows the code was wrong and did not have enough [[[[]]]]

Comments

@colemanw

@civibot
Copy link

civibot bot commented Feb 18, 2023

(Standard links)

@civibot civibot bot added the master label Feb 18, 2023
@eileenmcnaughton
Copy link
Contributor

@mattwire
image

@eileenmcnaughton
Copy link
Contributor

test this please (unrelated but might as well go for the green tick)

@colemanw
Copy link
Member

Thanks @mattwire for fixing our broken 💔 relationships. Just in time for valentine's day 😍 ❤️

@colemanw colemanw merged commit e3bc37f into civicrm:master Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants