formie icon indicating copy to clipboard operation
formie copied to clipboard

Migrating freeform forms using cli with a specified form handle fails

Open mikeymeister opened this issue 1 year ago • 1 comments

Describe the bug

When trying to migrate a freeform form to formie from the command line using the --form-handle flag, the command fails to find any forms.

Steps to reproduce

  1. Migrate a freeform form using craft formie/migrate/migrate-freeform --form-handle=<handle> in the CLI.

Form settings

Doesn't appear to influence this bug.

Craft CMS version

5.4.9 Pro

Plugin version

3.0.9

Multi-site?

Yes

Additional context

I think changing line 77 in console/controllers/MigrateController::actionMigrateFreeForm() from this:

$formIds[] = Freeform::getInstance()->forms->getFormByHandle($formHandle)->id;

to this:

$formIds[] = Freeform::getInstance()->forms->getFormByHandle($formHandle)->getId()

will mimic how Freeform's getFormByHandle() function behaves and solves the issue in my use case. I may be missing something here though.

mikeymeister avatar Oct 28 '24 16:10 mikeymeister

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.9".

engram-design avatar Oct 28 '24 21:10 engram-design

Fixed in 3.0.10

engram-design avatar Nov 12 '24 21:11 engram-design