solspace / craft-freeform

Freeform for Craft: The most reliable form builder that's ready for wherever your project takes you.
https://docs.solspace.com/craft/freeform/v5/
Other
47 stars 59 forks source link

Failed to migrate m230101_200000_FF4to5_MigrateData.php: targetFieldHash #1545

Open steve-p96 opened 3 hours ago

steve-p96 commented 3 hours ago

What happened?

am trying to upgrade to Freeform 5.x.x, starting from version 3.13.32. I have attempted several approaches, always beginning with a fresh database. In my latest attempt, I successfully updated to the latest version of Freeform 3 and then to the latest version of Freeform 4, without any issues.

However, the process consistently fails during the execution of the migration file m230101_200000_FF4to5_MigrateData.php.

The error is as follows:

Exception: Undefined property: stdClass::$targetFieldHash (/**mylocalpath**/vendor/solspace/craft-freeform/packages/plugin/src/migrations/m230101_200000_FF4to5_MigrateData.php:352)

Errors and Stack Trace (if available)

No response

How can we reproduce this?

  1. Update from 4.1.22 to 5.6.3 via CLI

Freeform Edition

Pro

Freeform Version

3.13.32

Craft Version

4.12.5

When did this issue start?

After upgrading from older Freeform version

Previous Freeform Version

No response

gustavs-gutmanis commented 2 hours ago

Hi @steve-p96,

Would you be comfortable editing the file and commenting out the line 352 in /vendor/solspace/craft-freeform/packages/plugin/src/migrations/m230101_200000_FF4to5_MigrateData.php?

For some reason your dataset is missing the targetFieldHash entry in a confirmation field, commenting that line out would help you move through the migration and then you would manually adjust the confirmation field target again in the builder.

Meanwhile we would prepare a fix for this for the future version of freeform.