Problem/Motivation

Enabling the LottieFiles Field module causes a temporary unavailable error while creating a new field on any content type through UI admin/structure/types/manage/project/fields/add-field.

TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 45 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

This error seems highly related to the discussion in this issue: https://www.drupal.org/project/drupal/issues/3475505

Steps to reproduce

1. Install Drupal 11.1.5 through composer
2. Try to create a new field on any content type

Proposed resolution

API has been changed for new field type categories based on documentation
https://www.drupal.org/node/3375748

Remaining tasks

Full Stack trace
TypeError: Cannot access offset of type Drupal\Core\StringTranslation\TranslatableMarkup in isset or empty in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 45 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Drupal\Core\Plugin\DefaultPluginManager->getDefinition() (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 76)
Drupal\Component\Plugin\PluginManagerBase->createInstance() (Line: 136)
Drupal\field_ui\Form\FieldStorageAddForm->processFieldDefinitions() (Line: 80)
Drupal\field_ui\Form\FieldStorageAddForm->buildForm()
call_user_func_array() (Line: 528)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

User interface changes

API changes

https://www.drupal.org/node/3375748

Data model changes

CommentFileSizeAuthor
#4 LottieFiles Field Acquia DAM.png411.64 KBvipin.mittal18

Issue fork acquia_dam-3534537

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

sridhar52 created an issue. See original summary.

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

vipin.mittal18’s picture

Status: Active » Needs work
StatusFileSize
new411.64 KB

The issue can be reproduced by enabling the LottieFiles Field module and navigating to the page
admin/structure/types/manage/project/fields/add-field. Refer below screenshot:
LottieFiles Field Acquia DAM

vishalkhode’s picture

The WSOD error is caused by the LottieFiles Field module, not due the Acquia DAM module. The acquia_dam_asset field type has no_ui = TRUE, meaning it cannot be created through the UI. Therefore, it is unlikely for this error to occur when creating new field via the UI.

japerry’s picture

Title: acquia DAM module causes WSOD on field creation for all field types » Update Acquia DAM asset type category per #3375748
Category: Bug report » Task
Priority: Normal » Minor

Agreed, I doubt this will throw a WSOD, however, we should add the BC shim or remove the category altogether

vishalkhode’s picture

@japerry I think removing category make more sense here because as per the Drupal, the category can be defined to ensure that the field is appropriately listed under the specified category when created via the UI. However, since our field is configured not to display in the UI, so we can safely remove this option.

rajeshreeputra’s picture

Status: Needs work » Needs review

requesting review.

vishalkhode’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed changes, looks good to me. Hence, RTBC.

  • japerry committed f0200384 on 1.1.x authored by sridhar52
    Issue #3534537 by rajeshreeputra: Update Acquia DAM asset type category...
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Agreed, with no ui this shouldn't appear at all anyway.

Status: Fixed » Closed (fixed)

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