Unable to add content after update version 1.0.0-beta5 to version 1.0.0-beta6.

Created on 19 December 2022, almost 2 years ago
Updated 5 July 2024, 5 months ago

Unable to add content after update version 1.0.0-beta5 to version 1.0.0-beta6.

Thanks for this module!

I used priority critical because I cannot add content anymore. I hope this is the right way to label the issue. Please change if it's not critical.

After updating the module, I cannot add content that uses this module on an image field. I'm on Drupal 9.4.9 I updated to 9.5.0 to see if it fixed the error, but it didn't. Uninstalling the module did fix the problem, and I was able to add content again.

The website encountered an unexpected error. Please try again later.
TypeError: Drupal\filefield_paths\Utility\FieldItem::getFromSupportedWidget(): Return value must be of type ?Drupal\file\Plugin\Field\FieldType\FileFieldItemList, Drupal\Core\Field\FieldItemList returned in Drupal\filefield_paths\Utility\FieldItem::getFromSupportedWidget() (line 58 of modules/contrib/filefield_paths/src/Utility/FieldItem.php).

Drupal\filefield_paths\Utility\FieldItem::getFromSupportedWidget(Array, Array) (Line: 215)
filefield_paths_field_widget_form_alter(Array, Object, Array) (Line: 562)
Drupal\Core\Extension\ModuleHandler->alter('field_widget_form', Array, Object, Array) (Line: 572)
Drupal\Core\Extension\ModuleHandler->alterDeprecated('Deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_field_widget_single_element_form_alter or hook_field_widget_single_element_WIDGET_TYPE_form_alter instead. See https://www.drupal.org/node/3180429.', Array, Array, Object, Array) (Line: 364)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 161)
Drupal\file\Plugin\Field\FieldWidget\FileWidget->formMultipleElements(Object, Array, Object) (Line: 111)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 183)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 781)
Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->formElement(Object, 0, Array, Array, Object) (Line: 353)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 1116)
Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->formMultipleElements(Object, Array, Object) (Line: 111)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object, NULL) (Line: 1238)
Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->form(Object, Array, Object) (Line: 183)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 121)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 127)
Drupal\node\NodeForm->form(Array, Object) (Line: 106)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('node_destination_form', Object) (Line: 278)
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: 564)
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: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

🇳🇱Netherlands jazzper

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇱Netherlands jazzper

    I noticed a reference to the paragraphs module in the error. After uninstalling the paragraphs module I could add content again. So I guess the problem is using this module on a paragraph with an image field.

    This is with Drupal 9.5.4 and Paragraphs 8.x-1.15.

  • FYI, if anyone reverted back to beta5, make sure to update your module config so that you don't have the security vulnerability that was fixed in beta6.

  • Status changed to Postponed: needs info 6 months ago
  • Is this issue still happening in dev?

  • 🇳🇱Netherlands jazzper

    Sorry, I uninstalled the module because of this issue. Atm I have no time to install the dev version. Maybe I have time later on

  • 🇳🇱Netherlands jazzper

    @solideogloria I installed the dev module and the site still breaks when I try to add content. I get a different error now:

    The website encountered an unexpected error. Try again later.
    
    AssertionError: "Geolocation" must be defined in MODULE_NAME.field_type_categories.yml in assert() (line 186 of core/lib/Drupal/Core/Field/FieldTypePluginManager.php).
    
    Drupal\Core\Field\FieldTypePluginManager->getGroupedDefinitions(Array, 'label', 'id') (Line: 155)
    Drupal\field_ui\Form\FieldStorageAddForm->buildForm(Array, Object, 'node', 'article')
    call_user_func_array(Array, Array) (Line: 536)
    Drupal\Core\Form\FormBuilder->retrieveForm('field_ui_field_storage_add_form', Object) (Line: 283)
    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: 627)
    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: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    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: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    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: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    When I uninstall the paragraphs module, the error goes away, and I can add content again. Without the File (Field) Paths module my website is working. I couldn't find the settings for this module when I went to the image field on a content type or paragraph, so I didn't configure the module. Also, the module doesn't show up on the update page (/admin/reports/updates).

  • We are not using filefield_paths module in our site, but still we are having the same issue. We are not able to add a new field, we ahve tried it in drupal 10.2.x as well as 10.3.x

Production build 0.71.5 2024