Avoid data loss on D9 migration

Created on 25 November 2022, over 1 year ago
Updated 19 May 2023, about 1 year ago

Hello,

I would migrate my project to Drupal 9 but I have hundred of computed field on it.
I have tested that after the upgrade all my formula was disappeared due to your decision to avoid PHP code in the backend.

If I migrate I loss all my formulas or they are stored somewhere?

Or is better to copy them all before the upgrade and then upgrade?

PS: Regarding your decision, I understand the need for security but having to create custom modules to get what used to be quick and easy seems to me a step backwards in encouraging the use of Drupal instead of other systems.
Wouldn't it be possible to make the user choose whether to use the form as before or use it safely?
Don't take this as a criticism, only a discussion.

💬 Support request
Status

Active

Version

3.0

Component

Documentation

Created by

🇮🇹Italy dkatena

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy dkatena

    UPDATE: For those who need to use the old system in Drupal 9 with the formulas in the UI, the procedure is simple.
    NOTE: The use of formulas in the UI has been deprecated by the developers for security reasons

    First of all it's necessary to use the "computed_field 8.x-2.0" version and edit core_version_requirement line in the computed_field.info.yml file.

    I use the file like this:

    name: ComputedField
    type: module
    description: Defines a field type that allows values to be "computed" via PHP code.
    core_version_requirement: ^8 || ^9
    package:Field types

    This way you can migrate to Drupal 9 and have time to copy your formulas into a custom module before moving to version 3.0

  • 🇦🇹Austria maxilein

    That does not solve all the problems:
    It is not only the formulas you may be missing. What about views that depend on/use these caculated fields? Do you need to go though all of them?! And re-add fields that were deleted during uninstall?!

  • 🇮🇹Italy dkatena

    I still use the modified 8.x-2.0 version precisely because it allows me to use Views and continue with the formulas in the UI.
    I'm following with interest the work on version 4.x which seems to be the best successor to the module.

Production build 0.69.0 2024