After saving a node with string text fields or select list fields that are hidden by condition on node save all these fields are empty. The data is lost.

Comments

Publishing Future created an issue. See original summary.

publishing future’s picture

Issue summary: View changes
drOptimum’s picture

I also have similar issue. Any hidden with conditional_fields fields lose their data on node save.
Drupal 8.6.12
conditional_fields 8.x-1.0-alpha5

gooddev’s picture

same problem here, only after submitting the form for the second time after validation gets the values saved

drOptimum’s picture

StatusFileSize
new1.04 KB

The attached patch deletes lines 112 and 119 from conditional_fields.js file.

drOptimum’s picture

StatusFileSize
new868 bytes

Updated patch submitted - file path updated as previous patch failed to apply

drOptimum’s picture

Assigned: Unassigned » drOptimum
drOptimum’s picture

grimal’s picture

Same problem here, conditional_fields broke the node edit page if there is a workflow field, it clears the invisible fields of the schedule option.

Is it possible to fix the issue by clearing the input only if it's managed by conditional field?

  • colan committed 96bbd31 on 8.x-1.x authored by drOptimum
    Issue #3012821 by drOptimum, colan: Stop emptying fields when making...
colan’s picture

Status: Active » Fixed
StatusFileSize
new1.17 KB

This is an unexpected regression from D7.

The above patch didn't apply. Paths must be relative to the module's directory, not the Drupal root. Fixed in this new patch here for Composer patching on top of old stable versions.

For folks that actually want to delete data, please handle that in another issue.

Status: Fixed » Closed (fixed)

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