-
Notifications
You must be signed in to change notification settings - Fork 11
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
removing properties and fields without paths from cfe #195
Conversation
stanford_capx.forms.inc
Outdated
@@ -997,12 +997,22 @@ function stanford_capx_mapper_form_submit($form, $form_state) { | |||
// If there are properties... | |||
$properties = @$values['field-mapping'][$entity . "-properties"]; | |||
if (!empty($properties)) { | |||
foreach ($properties as $key => $value) { | |||
if (empty($value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (empty($value)) { | |
if (empty(array_filter($value))) { |
So the form was not removing the property mapping on save but rather, was introducing an empty string? So if I have this right, what happened was:
Is that right? It was the action of trying to remove the mapping that caused the error? |
@sherakama yes, you have the scenario correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this seems reasonable to me. @pookmish any objections?
The logic is a little messy. lately ive starting to become a fan of |
ok, the properties and fields array are a bit different but this latest version is working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
READY FOR REVIEW
Summary
Needed By (Date)
Urgency
Steps to Test
Affected Projects or Products
Associated Issues and/or People