verbb / hyper

A Craft CMS plugin for managing links, focusing on user experience.
Other
22 stars 14 forks source link

ShellCommandException on Typed Link Field migration command #135

Closed elfacht closed 5 months ago

elfacht commented 5 months ago

Describe the bug

When installing the plugin locally as a trial and running the migrate command ./craft hyper/migrate/typed-link-field, this exception appears:

Exception 'craft\errors\ShellCommandException' with message 'The shell command "mysqldump --defaults-file="/tmp/rovzylmhjzxw.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --no-data --result-file="/src/cms/storage/backups/myproject-craft-cms-dev--2024-04-11-072305--v4.8.6.sql" craft && mysqldump --defaults-file="/tmp/rovzylmhjzxw.cnf" --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --no-create-info --ignore-table=craft.pcms_assetindexdata --ignore-table=craft.pcms_cache --ignore-table=craft.pcms_imagetransformindex --ignore-table=craft.pcms_resourcepaths --ignore-table=craft.pcms_phpsessions --ignore-table=craft.pcms_sessions craft >> "/src/cms/storage/backups/myproject-craft-cms-dev--2024-04-11-072305--v4.8.6.sql"" failed with exit code -1: Command terminated by signal 2'

in /src/cms/vendor/craftcms/cms/src/db/Connection.php:569

Stack trace:
#0 /src/cms/vendor/craftcms/cms/src/db/Connection.php(286): craft\db\Connection->_executeDatabaseShellCommand(Object(mikehaertl\shellcommand\Command))
#1 /src/cms/vendor/craftcms/cms/src/db/Connection.php(249): craft\db\Connection->backupTo('/src/cms/storag...')
#2 /src/cms/vendor/verbb/hyper/src/console/controllers/MigrateController.php(62): craft\db\Connection->backup()
#3 /src/cms/vendor/verbb/hyper/src/console/controllers/MigrateController.php(35): verbb\hyper\console\controllers\MigrateController->_migrate('verbb\\hyper\\mig...')
#4 [internal function]: verbb\hyper\console\controllers\MigrateController->actionTypedLinkField()
#5 /src/cms/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /src/cms/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#7 /src/cms/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('typed-link-fiel...', Array)
#8 /src/cms/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('typed-link-fiel...', Array)
#9 /src/cms/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('hyper/migrate/t...', Array)
#10 /src/cms/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction('hyper/migrate/t...', Array)
#11 /src/cms/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('hyper/migrate/t...', Array)
#12 /src/cms/vendor/craftcms/cms/src/console/Application.php(122): yii\console\Application->handleRequest(Object(craft\console\Request))
#13 /src/cms/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#14 /src/cms/craft(13): yii\base\Application->run()
#15 {main}

According to the Craft CMS reference could be a licensing issue.

Steps to reproduce

  1. Install the plugin as a trial locally.
  2. Have Typed Link Field plugin installed.
  3. Run ./craft hyper/migrate/typed-link-field

Craft CMS version

4.8.6

Plugin version

1.1.27

Multi-site?

No

Additional context

No response

engram-design commented 5 months ago

From what I can tell, there's a problem running Craft's backup command. As a quick fix, you can disable the backupOnMigrate configuration setting.

elfacht commented 5 months ago

@engram-design Thanks, that did the trick.