Problem/Motivation
See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
public function getStorage($entity_type);
getStorage() only has 1 parameter, but it's being called with 2.
src/Plugin/ImporterBase.php L113
$entity = $this->entityTypeManager->getStorage($this->configuration['entity_type'], $this->configuration['entity_type_bundle'])->create($content);
Proposed resolution
Remove the second parameter. Bundle is already supplied by the $content variable and is respected by the create() method.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2981456-3.patch | 770 bytes | mahtab_alam |
| #2 | csv_importer-missing_bundle_param-2981456-2.patch | 616 bytes | pingers |
Comments
Comment #2
pingers commentedHere's a patch.
Comment #3
mahtab_alam commentedComment #4
pingers commentedI'm sorry, why do we need a patch with a commented out line of code? This is why we use git.
Comment #5
mikejw commentedpatch in #2 looks good.
Comment #6
lashabp commented