Thanks for the D8 port of the module!

I noticed an issue where the Solr extractor config form did not show up after the ajax call.
The following is triggered in backend:

ArgumentCountError: Too few arguments to function Drupal\search_api_attachments\TextExtractorPluginBase::__construct(), 6 passed in modules/contrib/search_api_attachments/src/Plugin/search_api_attachments/SolrExtractor.php on line 37 and exactly 8 expected in Drupal\search_api_attachments\TextExtractorPluginBase->__construct() (line 67 of modules/contrib/search_api_attachments/src/TextExtractorPluginBase.php).

Drupal\search_api_attachments\TextExtractorPluginBase->__construct(Array, 'solr_extractor', Array, Object, Object, Object) (Line: 37)
Drupal\search_api_attachments\Plugin\search_api_attachments\SolrExtractor->__construct(Array, 'solr_extractor', Array, Object, Object, Object, Object) (Line: 46)
Drupal\search_api_attachments\Plugin\search_api_attachments\SolrExtractor::create(Object, Array, 'solr_extractor', Array) (Line: 21)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('solr_extractor', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('solr_extractor', Array) (Line: 237)
Drupal\search_api_attachments\Form\TextExtractorFormSettings->buildTextExtractorConfigForm(Array, Object) (Line: 94)
Drupal\search_api_attachments\Form\TextExtractorFormSettings->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('search_api_attachments_admin_form', Object) (Line: 275)
Drupal\Core\Form\FormBuilder->buildForm('search_api_attachments_admin_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 41)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I'll attach a patch shortly.

Comments

herved created an issue. See original summary.

herved’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.55 KB
izus’s picture

Status: Needs review » Active

Hi herved,

did you test it in admin/config/search/search_api_attachments with the dev version of drupal core too (8.7.x)
did a test of that and it seems to work for all extractors (solr, tika ...)

please add the details if you did the same test above and encountered the issue

herved’s picture

Status: Active » Needs review

Hello izus,

I don't see how updating the core would fix it. The amount of arguments between the call to parent::__construct() and the actual parent constructor definition does not match.

But I just tested with core from 8.6.6 to 8.6.9 and 8.7.x. The issue remains.
It was introduced by this commit which is only in DEV at the moment. Perhaps I should have specified this earlier, but I wasn't sure.

I'm currently on dev because I'm working on a patch to add a Tika JAX-RS Server extractor plugin.
Let me know if you would be interested so I can open another issue.

Regards

  • izus committed a57edb9 on 8.x-1.x authored by herved
    Issue #3033874 by herved, izus: ArgumentCountError: Contructor issue for...
izus’s picture

Status: Needs review » Fixed

Thanks
this is now merged

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.