Problem/Motivation
While importing via drush dcdi --folder = X I am getting the following error.
Steps to reproduce
Module and core situation:
- Core: 8.7.6
- paragraphs: 1.9
- default_content: 1.0.0-alpha8
- default_content_deploy:1.0-beta1
- Create Content Type Test
- Create Reference Fields with paragraphs
- Create new content and export
- Rimove new content
- Run drush dcdi
Proposed resolution
In the Importer.php file: 391 check if the entity implements the EntityChangedInterface interface
$changed_time_entity = $entity->getChangedTime();
change in
if ($entity instanceof EntityChangedInterface) {
$changed_time_entity = $entity->getChangedTime();
}
but how do I get the value of the last modification for the reference language?
Error complete
[06-Oct-2020 07:18:37 UTC] [2020-10-06 07:18:37] php.ERROR: Error: Call to undefined method Drupal\paragraphs\Entity\Paragraph::getChangedTime() in Drupal\default_content_deploy\Importer->editEntityData() (line 392 of /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php) #0 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(310): Drupal\default_content_deploy\Importer->editEntityData(Array) #1 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(305): Drupal\default_content_deploy\Importer->decodeFile(Object(stdClass)) #2 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(223): Drupal\default_content_deploy\Importer->decodeFile(Object(stdClass)) #3 /var/www/html/web/modules/contrib/default_content_deploy/src/Commands/DefaultContentDeployCommands.php(273): Drupal\default_content_deploy\Importer->prepareForImport() #4 [internal function]: Drupal\default_content_deploy\Commands\DefaultContentDeployCommands->contentDeployImport(Array) #5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array) #6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData)) #7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData)) #8 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData)) #9 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/vendor/symfony/console/Application.php(1010): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #14 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput)) #15 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array) #16 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...') #17 {main}. {"severity_level":3} {"referer":"","ip":"127.0.0.1","request_uri":"http://default/","uid":0,"user":""}
[06-Oct-2020 07:18:37 UTC] Error: Call to undefined method Drupal\paragraphs\Entity\Paragraph::getChangedTime() in /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php on line 392 #0 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(310): Drupal\default_content_deploy\Importer->editEntityData(Array)
#1 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(305): Drupal\default_content_deploy\Importer->decodeFile(Object(stdClass))
#2 /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php(223): Drupal\default_content_deploy\Importer->decodeFile(Object(stdClass))
#3 /var/www/html/web/modules/contrib/default_content_deploy/src/Commands/DefaultContentDeployCommands.php(273): Drupal\default_content_deploy\Importer->prepareForImport()
#4 [internal function]: Drupal\default_content_deploy\Commands\DefaultContentDeployCommands->contentDeployImport(Array)
#5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#8 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(302): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#9 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/vendor/symfony/console/Application.php(1010): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(49): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#16 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#17 {main}
Error: Call to undefined method Drupal\paragraphs\Entity\Paragraph::getChangedTime() in Drupal\default_content_deploy\Importer->editEntityData() (line 392 of /var/www/html/web/modules/contrib/default_content_deploy/src/Importer.php).
[warning] Drush command terminated abnormally.
wodby
Comments
Comment #2
smarchese commentedComment #3
miroslav-leeDid you try use a new version of this module?
Comment #4
mkalkbrenneralready fixed