diff --git a/lib/alchemy/upgrader/tasks/ingredients_migrator.rb b/lib/alchemy/upgrader/tasks/ingredients_migrator.rb index 9208d810dd..1ebf2fafbf 100644 --- a/lib/alchemy/upgrader/tasks/ingredients_migrator.rb +++ b/lib/alchemy/upgrader/tasks/ingredients_migrator.rb @@ -56,6 +56,8 @@ def self.call(element) ingredient.value = content.ingredient end data = ingredient.class.stored_attributes.fetch(:data, []).each_with_object({}) do |attr, d| + next unless essence.respond_to?(attr) + d[attr] = essence.public_send(attr) end ingredient.data = data diff --git a/spec/dummy/config/alchemy/elements.yml b/spec/dummy/config/alchemy/elements.yml index c34e4550b7..0a2c439114 100644 --- a/spec/dummy/config/alchemy/elements.yml +++ b/spec/dummy/config/alchemy/elements.yml @@ -263,6 +263,7 @@ type: Text default: Hello World settings: + anchor: from_value linkable: true - role: text type: Richtext