formie
formie copied to clipboard
Migrating freeform forms using cli with a specified form handle fails
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
- 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.
Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.9".
Fixed in 3.0.10