OgBehaviorHandler validate method removes errors for other fields
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2216819. --> Reported by: [richard.thomas](https://www.drupal.org/user/1924680) >>> <p>The validate method in OgBehaviorHandler has:</p> <p><code>$errors = array();</code></p> <p>at the end, which I guess is designed to remove normal field errors for the og field as the error handling is done differently. However $errors is passed by reference from entityreference_field_validate() and contains all the existing errors for the entity. So as far as I can tell this is removing all existing errors for all fields. The impact depends on when this field validate is run, but I've had this prevent field validation for a particular field on my site. </p> <p>I've fixed this by changing it to unset any existing errors for that individual field, which seems to fix the issue, and OG errors still seem to work correctly.</p>
issue