Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config:export:entity] user -> error Call to undefined method Drupal\Core\Entity\ContentEntityType::getConfigPrefix() #4299

Open
vanessakovalsky opened this issue Mar 16, 2021 · 0 comments

Comments

@vanessakovalsky
Copy link

An error is thrown when trying to export config for entity user

[ config:export:entity ] An error is thrown when trying to export config for entity user and don't let me export the entity user

Problem/Motivation

I'm trying to export config for entity user (bundle user) with command config:export:entity user and get an error from the console export command.

The return is the following :

Error: Call to undefined method Drupal\Core\Entity\ContentEntityType::getConfigPrefix() in /var/www/html/d8-anthony/vendor/drupal/console/src/Command/Config/ExportEntityCommand.php on line 232 #0 /var/www/html/d8-anthony/vendor/symfony/console/Command/Command.php(255): Drupal\Console\Command\Config\ExportEntityCommand->execute()
#1 /var/www/html/d8-anthony/vendor/symfony/console/Application.php(1010): Symfony\Component\Console\Command\Command->run()
#2 /var/www/html/d8-anthony/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand()
#3 /var/www/html/d8-anthony/vendor/drupal/console-core/src/Application.php(187): Symfony\Component\Console\Application->doRun()
#4 /var/www/html/d8-anthony/vendor/drupal/console/src/Application.php(64): Drupal\Console\Core\Application->doRun()
#5 /var/www/html/d8-anthony/vendor/symfony/console/Application.php(148): Drupal\Console\Application->doRun()
#6 /var/www/html/d8-anthony/vendor/drupal/console/bin/drupal.php(89): Symfony\Component\Console\Application->run()
#7 /var/www/html/d8-anthony/vendor/drupal/console/bin/drupal(4): require('/var/www/html/d...')
#8 {main}
Error: Call to undefined method Drupal\Core\Entity\ContentEntityType::getConfigPrefix() in Drupal\Console\Command\Config\ExportEntityCommand->execute() (line 232 of /var/www/html/d8-anthony/vendor/drupal/console/src/Command/Config/ExportEntityCommand.php).

``` 

### How to reproduce
* Add some fields to user entity 
* Try to export config with commande drupal config:export:entity user  

**Details to include:**
- Drupal version : 8.9.13
- Console version 1.9.7

### Solution
* Export manually file with export:config:single works but it's a workaround and need to be fix.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant