Problem/Motivation

I get this error when i try to save
/admin/config/search/solr-search-synonyms/import
without upload file.

TypeError: Drupal\solr_search_synonym\Plugin\solr_search_synonym\import\Solr::parseFile(): Argument #1 ($file) must be of type Drupal\file\Entity\File, string given, called in /var/www/html/web/modules/contrib/solr_search_synonym/src/Form/SynonymImportForm.php on line 251 in Drupal\solr_search_synonym\Plugin\solr_search_synonym\import\Solr->parseFile() (line 26 of modules/contrib/solr_search_synonym/src/Plugin/solr_search_synonym/import/Solr.php).
Drupal\solr_search_synonym\Form\SynonymImportForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('solr_search_synonym_import', Array, Object) (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Goto /admin/config/search/solr-search-synonyms/import
Save the form

Thank you

Command icon 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

trickfun created an issue. See original summary.

ushma made their first commit to this issue’s fork.

ushma changed the visibility of the branch 3537072-drupalsolrsearchsynonympluginsolrsearchsynonymimportcsvparsefile-argument-1 to hidden.

ushma’s picture

Assigned: Unassigned » ushma

ushma’s picture

Please review the MR. Also attaching the related patch

ushma’s picture

Assigned: ushma » Unassigned
Status: Active » Needs review
bhojwanipankaj05’s picture

Issue fixed and implemented with latest release -
https://www.drupal.org/project/solr_search_synonym/releases/2.0.7
Thanks @ushma @trickfun

Note : We can not push the .gitlab-ci.yml file, as it is specific to an organization’s or project’s CI/CD setup.

bhojwanipankaj05’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

bhojwanipankaj05’s picture

Status: Fixed » Closed (fixed)