Problem/Motivation
We use Paragraph Sets to get a default set of three "Slides" on a "Slideshow" component. Before updating from 3.0.1, it worked as expected.
After updating to 3.0.2, clicking the "Add Slideshow" paragraph button on the node edit screen gives an AJAX error.
After updating, my default slides were not appearing. I navigated to the Form Display settings for the parent component, and changed the field widget so that "Show Paragraphs Sets" was enabled. I saved, then went back to the edit form. I now get the AJAX error if I try to add the component again.
The website encountered an unexpected error. Try again later.<br><br><em class="placeholder">Error</em>: Call to a member function getFieldDefinition() on null in <em class="placeholder">Drupal\paragraphs_sets\ParagraphsSets::buildSelectSetSelection()</em> (line <em class="placeholder">114</em> of <em class="placeholder">modules/contrib/paragraphs_sets/src/ParagraphsSets.php</em>). <pre class="backtrace">paragraphs_sets_field_widget_complete_form_alter() (Line: 552) Drupal\Core\Extension\ModuleHandler->alter() (Line: 156) Drupal\Core\Field\WidgetBase->form() (Line: 1512) Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->form() (Line: 190) Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm() (Line: 843) Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->formElement() (Line: 459) Drupal\Core\Field\WidgetBase->formSingleElement() (Line: 1390) Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->formMultipleElements() (Line: 120) Drupal\Core\Field\WidgetBase->form() (Line: 1512) Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->form() (Line: 190) Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm() (Line: 121) Drupal\Core\Entity\ContentEntityForm->form() (Line: 134) Drupal\node\NodeForm->form() (Line: 107) Drupal\Core\Entity\EntityForm->buildForm() call_user_func_array() (Line: 536) Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 375) Drupal\Core\Form\FormBuilder->rebuildForm() (Line: 633) Drupal\Core\Form\FormBuilder->processForm() (Line: 326) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() (Line: 39) Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181) 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: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53) Asm89\Stack\Cors->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: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)
Steps to reproduce
1. Update module to 3.0.2.
2. Modify Form Display settings for parent component (in my case, it was a Paragraph of Slideshow that had a field called "Slides" which was an Entity reference revisions field using the "Paragraphs" widget.)
3. Edit widget of field and enable "Enable Paragraphs Sets".
4. Save.
5. Navigate to content type and attempt to add a "Slideshow" paragraph.
Issue fork paragraphs_sets-3527072
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
Comment #2
nesstheheronm, unable to reproduce
Comment #3
stborchertWe ran into this error also, so it's time to fix it :/
Comment #5
stborchertOh, wow.
While fixing issues raised by PHPStan I managed to break some function references 🙈 Fixed that.
Comment #7
stborchert