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
Comment #2
herved commentedComment #3
izus commentedHi 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
Comment #4
herved commentedHello 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
Comment #6
izus commentedThanks
this is now merged