Problem/Motivation
In the README under Drush commands, the example command implementations are as follows:
##### default-content-export
Arguments:
- **entity_type:** The entity type to export.
- **entity_id:** The ID of the entity to export.
options:
- **file:** Write out the exported content to a file instead of stdout
aliases: dce
- **required-arguments:** 2Example:
```
$ drush dce node 123 my_default_content_module
```Change the entity type, as we have them in the system.
```
$ drush dce node my_default_content_module
$ drush dce taxonomy_term my_default_content_module
$ drush dce file my_default_content_module
$ drush dce media my_default_content_module
$ drush dce menu_link_content my_default_content_module
$ drush dce block_content my_default_content_module
```
Running commands following these example formats causes an error due to incorrect declaration of optional arguments. The implementation in the README passes "my_default_content_module" as a required argument, which causes a "Too many arguments" error. This is true for all the Drush commands, all of which have different named optional arguments. The incorrect example implementation creates frustration for users relying on the README to correctly use the module. Updating the README is a quick lift that will benefit newcomers to the module.
Steps to reproduce
1) Create a piece of content in a Drupal website.
2) Create a custom module titled "my_default_content_module".
3) Run the following command: $ drush dce node <node id> my_default_content_module
4) Result is a terminal error of Too many arguments to "dce" command, expected arguments "entity_type_id" "entity_id". .
Proposed resolution
Update README documentation so that example Drush commands match correct declaration of optional arguments. E.g. $ drush dce node <node id> my_default_content_module becomes $ drush dce node <node id> --file="modules/custom/my_default_content_module/node/node1.yml". Repeat for other Drush commands.
Remaining tasks
- [ ] Update README
User interface changes
NA
API changes
NA
Data model changes
NA
Issue fork default_content-3546041
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
inregards2plutoJust made a merge request with the updated README! It includes the fixed example commands and some minor formatting changes.