- Issue created by @znerol
I have applied the patch and I have encountered an error when switching the attachment strategy in the form.
The AJAX call fails with the following stacktrace:
Auf der Website ist ein unerwarteter Fehler aufgetreten. Versuchen Sie es spΓ€ter noch einmal. Error: Typed property Drupal\tone\Plugin\ToneAttachmentStrategy\CssPublicFiles::$loadAsync must not be accessed before initialization in Drupal\tone\Plugin\ToneAttachmentStrategy\CssPublicFiles->buildConfigurationForm() (line 183 of modules/contrib/tone/src/Plugin/ToneAttachmentStrategy/CssPublicFiles.php). Drupal\tone\Form\ToneTypeForm->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: 54) ...
I have changed the declaration of $loadAync to
protected bool $loadAsync = FALSE;
, and it seems to fix the issue.- π¨πSwitzerland znerol
Thanks! Good find, that's probably an issue when operating on a preexisting entity.
-
znerol β
committed 6d3cb507 on 1.x
Issue #3489962 by znerol, coffeemakr: CSS Async Loading
-
znerol β
committed 6d3cb507 on 1.x
Automatically closed - issue fixed for 2 weeks with no activity.