Upgrading seeds_widgets from version 1.x to 2.0.x and identified that the data structure has changed significantly, requiring specialized update hooks to prevent data loss.

Summary of Changes:
The 2.0.x branch introduces architectural changes:

Widget Settings Storage: Moves from individual fields (field_seeds_widget_desktop, field_seeds_widget_modal_title, etc.) to a single serialized field_widget_settings field.
Formatter IDs: Renames widget types (e.g., grid -> seeds_widgets_grid).
CSS Class Normalization: Updates class formats (e.g., converting col-md-12 col-sm-12 to col-md-12).
Proposed Solution:
implemented hook_update_N functions in
seeds_widgets.install
to automate this migration:

seeds_widgets_update_9001: Creates the new field_widget_settings storage (using string_long type for serialized data).
seeds_widgets_update_9002: Updates field_seeds_widget_types to use a dynamic allowed values function, replacing static choices.
seeds_widgets_update_9003: Maps old widget type values to new formatter IDs (e.g. grid -> seeds_widgets_grid).
seeds_widgets_update_9004: Migrates actual setting values (desktop/tablet/mobile grid classes, modal titles) into the new serialized field, ensuring all translations are preserved.
seeds_widgets_update_9005: Cleans up by removing the legacy fields after successful migration.
seeds_widgets_update_9006: Normalizes CSS class strings to match the new formatter expectations.

Comments

ahmad-alyasaki created an issue. See original summary.

  • 5eb2898c committed on 2.0.x
    feat: #3572311 Provide Update Path from 8.x-1.x to 2.0.x: Data Migration...

  • 55c28794 committed on 2.5.x
    feat: #3572311 Provide Update Path from 8.x-1.x to 2.0.x: Data Migration...
ahmad-alyasaki’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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