The form submit: eck__entity__form_submit checks that the property value is not empty. This checks does not pass values like "0" which may be valid. (For example: title, status, a counter...)

//If we find a value set for a property lets just set it
  foreach($properties as $property => $info){
    $form_value = _eck_form_property_value($state, $property);
    if(isset($form_value) && !empty($form_value)){

A simple way to test it is to create a new eck entity (add form) and try to save the Title field as "0": Entity is saved without title (check the edit form).

Attaching a patch removing the !empty() expression.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GeduR’s picture

Status: Active » Needs review
GeduR’s picture

Issue summary: View changes
michaellander’s picture

Status: Needs review » Reviewed & tested by the community

Worked for me. I can't imagine there being an issue with this unless someone adding a pre_set behavior is assuming the value won't be null, which I can't imagine a situation where that's the case.

michaellander’s picture

Assigned: Unassigned » michaellander

  • Commit af272b1 on 7.x-2.0.x, 7.x-2.1.x authored by GeduR, committed by michaellander:
    Issue #2209587 by GeduR: Entity properties could be empty.
    

  • Commit af272b1 on 7.x-2.0.x, 7.x-2.1.x authored by GeduR, committed by michaellander:
    Issue #2209587 by GeduR: Entity properties could be empty.
    
fmizzell’s picture

Assigned: michaellander » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit af272b1 on 7.x-2.x, 7.x-2.0.x, 7.x-2.1.x authored by GeduR, committed by michaellander:
    Issue #2209587 by GeduR: Entity properties could be empty.
    

  • Commit af272b1 on 7.x-2.x, 7.x-3.x authored by GeduR, committed by michaellander:
    Issue #2209587 by GeduR: Entity properties could be empty.