I just installed the consumer module (8.x-1.10) as I want to use the Consumer Image Style module. On 'admin/config/services/consumer' page, whenever I click '+Add Consumer' button or 'edit' button for the default consumer, the following error shows:
Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getThirdPartySettings() in filefield_paths_field_widget_form_alter() (line 217 of modules/contrib/filefield_paths/filefield_paths.module).
filefield_paths_field_widget_form_alter(Array, Object, Array) (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('field_widget_form', Array, Object, Array) (Line: 355)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 162)
Drupal\file\Plugin\Field\FieldWidget\FileWidget->formMultipleElements(Object, Array, Object) (Line: 116)
Drupal\image\Plugin\Field\FieldWidget\ImageWidget->formMultipleElements(Object, Array, Object) (Line: 113)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 178)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 125)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 17)
Drupal\consumers\Entity\Form\ConsumerForm->form(Array, Object) (Line: 144)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 520)
Drupal\Core\Form\FormBuilder->retrieveForm('consumer_edit_form', Object) (Line: 277)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 91)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
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: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 49)
Asm89\Stack\Cors->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: 694)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Currently, I am using Drupal Core 8.8.1 and updated everything to the latest version. Any ideas on how to fix it?
Thanks,
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3105435-7.patch | 481 bytes | vikib |
Comments
Comment #2
eojthebraveHey @sprklinginfo, thanks for reporting this issue.
I was unable to replicate this with Consumers 8.x-1.10, and Drupal core 8.8.2. Looking at the trace, it seems like filefield_paths module is the likely culprit here. My best guess is it's related to this issue https://www.drupal.org/project/filefield_paths/issues/2718783, though I haven't tried the patch there yet. Could you give that patch a try, or disable filefield_paths, and see if this issue goes away?
If that does resolve the issue feel free to mark this one as fixed, and maybe add a link to the original post pointing anyone that lands here to the filefield_paths issue.
If it doesn't fix the problem I can try installing filefield_paths sometime in the future and seeing if that causes issues for me too.
Comment #3
vikib commentedHello,
I would like to reopen the issue since I suspect this bug has a relation with silent fallbacks.
So it obviously has a connection to the following issue:
https://www.drupal.org/project/drupal/issues/3085167
As an evidence I’m providing the Drupal shell output demonstrating the issue in action:
Comment #4
vikib commentedHello,
I would like to reopen the issue since I suspect this bug has a relation with silent fallbacks.
So it obviously has a connection to the following:
#3085167: No exception on missing widget or formatter, but a silent fallback
As an evidence I’ll provide the Drupal shell output demonstrating the issue in action:
Comment #5
vikib commentedComment #6
vikib commentedComment #7
vikib commentedAfter careful examination this is place where the issue is occur.
The ‘type’ => ‘image’ should be replaced with the ‘image_image’.
Comment #8
hchonovAs already mentioned the widget plugin ID "image" is invalid, instead it is called "image_image". The exception is not thrown when simply accessing the form as then a fallback to the default widget for the field type is silently activated, however with custom or contrib code this could fail when the definition is retrieved.
Comment #10
eojthebraveThanks @vikib for the patch. I committed this patch + some update code in consumers.install. And thank you @sprklinginfo for originally reporting this, and @hchonov for helping with review.