Trying to analyze and upgrade views_dow and getting the following error:
drush @drupal8.dev dmu-analyze views_dow --path=modules/views_dow
Indexing...done.
[error] exception 'InvalidArgumentException' with message '$string ("") must be a string.' in /var/www/drupal8.dev/drupal/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php:140
This is an install of drupal-8.1.8
Here's the full Trace:
Stack trace:
#0 /var/www/drupal8.dev/drupal/core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php(71): Drupal\Core\StringTranslation\TranslatableMarkup->__construct(NULL, Array, Array, Object(Drupal\Core\StringTranslation\TranslationManager))
#1 /var/www/drupal8.dev/drupal/modules/drupalmoduleupgrader/src/Plugin/DMU/Analyzer/FlagHookDeriver.php(47): Drupal\drupalmoduleupgrader\DeriverBase->t(NULL, Array)
#2 /var/www/drupal8.dev/drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(100): Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FlagHookDeriver->getDerivativeDefinitions(Array)
#3 /var/www/drupal8.dev/drupal/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(86): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#4 /var/www/drupal8.dev/drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(274): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#5 /var/www/drupal8.dev/drupal/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#6 /var/www/drupal8.dev/drupal/modules/drupalmoduleupgrader/drupalmoduleupgrader.drush.inc(108): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#7 /var/www/drupal8.dev/drupal/modules/drupalmoduleupgrader/drupalmoduleupgrader.drush.inc(244): _dmu_plugin_list('analyzer')
#8 [internal function]: drush_drupalmoduleupgrader_dmu_analyze('views_dow')
#9 /usr/local/share/drush/includes/command.inc(366): call_user_func_array('drush_drupalmod...', Array)
#10 /usr/local/share/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
#11 [internal function]: drush_command('views_dow')
#12 /usr/local/share/drush/includes/command.inc(185): call_user_func_array('drush_command', Array)
#13 /usr/local/share/drush/lib/Drush/Boot/BaseBoot.php(73): drush_dispatch(Array)
#14 /usr/local/share/drush/includes/preflight.inc(88): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15 /usr/local/share/drush/drush.php(12): drush_main()
#16 {main}
Comments
Comment #2
jhoe08 commentedDo you have any idea on how to solve this issues?
Thanks,
Newbie Jhoe...
Comment #3
ivavictoriaSame error just happened to me when using dmu_analyze. However, dmu_upgrade ran with no errors.
Comment #4
joelpittetWith the latest dev it is showing this instead
Comment #5
deepa_lissa commentedI got the same problem when I used the dmu-analyze. Have any idea on how to solve this issue?
Comment #6
dman commentedWhen using the normal
drush dl drupalmoduleupgraderandcomposer updateinstall instructions, I got results identical to those described in the OP.When using
composer require drupal/drupalmoduleupgrader:8.x-1.x-devinside a lightning-project install basedrupal/core:8.2.0(in the hopes that that would treat the composer dependencies better) but that actually sent me into composer dependency hell ( phpdocumentor/reflection-docblock and grom358/pharborist FWIW )I did a fuller
composer upgradeand tried again.Half an hour later , I could download drupalmoduleupgrader again (
drupal/core (8.2.1), drupal/lightning (8.1.11)plus many others) .. and found that, despite appearing to be composer-friendly, drupalmoduleupgrader does not in fact use the drupal/core or drupal-project autoloaders after all.After yet another in-project composer install (at least this time things were well cached)
I have indeed progressed to the error reported by @joelpittet in #4. Same goes for dmu-upgrade .
Attempting --no-halt-on-error did not go well either.
My sample mode was admin_actions - which I suspect needs a full rewrite anyway, so I'll go back to basics for this - I just thought it was worth a try to get dmu to convert some scaffolding for me.
Comment #7
cosmicdreams commentedHi all:
I've been watching this issue and have something interesting to report.
I installed drupalmoduleupgrader using the installation steps described on it's module page for Drupal 8.2.4 and ran into the issue described here whenever I do a
drush dmu-analyze [MODULE_NAME]But it doesn't fail the same way for
drush dmu-upgrade [MODULE_NAME]It actually looks like it did it's job.
Comment #8
geek-merlinPatch flying in that fixes the issue for me.
Comment #9
dman commentedI can confirm that patch #8 does make this error go away for me.
Applies to todays drupalmoduleupgrader 8.x-1.2
and running
Drupal 8.2.7-dev
Drush 8.1.8
And now produces the right result.
Visual code review ... looks sane enough.
(I can't comment on wider ways this problem could be avoided, but the patch certainly fixes the symptom in as tidy a way as could be expected)
Comment #10
sher1 commentedI can also confirm the patch worked against Drupal 8.2.7(not dev), Drush 8.1.2
Comment #11
jcnventuraThis is a duplicate of #2635944: InvalidArgumentException' with message '$string (""), that is already committed to the -dev version, but not yet in drupalmoduleupgrader 8.x-1.2.