- Issue created by @joseph.olstad
- 🇨🇦Canada web247 Toronto
I can look into the phpstan issues for toc_api and push for a tagged release, if that helps.
- 🇨🇦Canada joseph.olstad
@web247 yes that would help immensely!
Thank you!
- 🇨🇦Canada joseph.olstad
Great, @danrod fixed all the phpstan errors and now the automated tests are passing for toc_api!
Thanks @web247!
- 🇨🇦Canada web247 Toronto
We will look into the 4 remaining test issues for the layout_builder_st today. @danrod
- 🇨🇦Canada web247 Toronto
We will look into the 4 remaining test issues for the layout_builder_st today. @danrod
- 🇨🇦Canada smulvih2 Canada 🍁
There is an issue I discovered today, affecting both 5.4.x and 6.1.x. The issue prevents an image upload using the Entity Browser field widget. The error comes from wxt_ext_media:
getCurrentEntity() failed: No valid media entity found.
TypeError: Cannot assign array to property Drupal\file\Plugin\Validation\Constraint\FileExtensionConstraint::$extensions of type string in Symfony\Component\Validator\Constraint->__construct() (line 133 of /var/www/vendor/symfony/validator/Constraint.php).
The issue seems to start here - https://github.com/drupalwxt/wxt/blob/f1e6ab364f2dc56cec811c39de40eb15a8e8bdbf/modules/custom/wxt_ext/wxt_ext_media/src/Plugin/EntityBrowser/Widget/EntityFormProxy.php#L98
At this point, $form_state seems to only have reference to the tab instance and no field values.
To reproduce, add an image field to a content type, using the Entity browser field widget. Then add/modify a node and use the Upload tab in the Entity Browser dialog, see the issue.
- 🇨🇦Canada web247 Toronto
I tried replicate your issue but I had no luck, but I got another issue when trying to add an image from the Entity Browser:
Did you also see that?
This is what I am seeing in the DBlog table:
Warning: Undefined variable $edit_button_access in Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget->displayCurrentSelection() (line 335 of /var/www/html/html/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/FileBrowserWidget.php) #0 /var/www/html/html/core/includes/bootstrap.inc(108): _drupal_error_handler_real() #1 /var/www/html/html/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/FileBrowserWidget.php(335): _drupal_error_handler() #2 /var/www/html/html/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php(415): Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget->displayCurrentSelection() #3 /var/www/html/html/modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/FileBrowserWidget.php(146): Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget->formElement() #4 /var/www/html/html/core/lib/Drupal/Core/Field/WidgetBase.php(459): Drupal\entity_browser\Plugin\Field\FieldWidget\FileBrowserWidget->formElement() #5 /var/www/html/html/core/lib/Drupal/Core/Field/WidgetBase.php(101): Drupal\Core\Field\WidgetBase->formSingleElement() #6 /var/www/html/html/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php(197): Drupal\Core\Field\WidgetBase->form() #7 /var/www/html/html/core/lib/Drupal/Core/Entity/ContentEntityForm.php(121): Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm() #8 /var/www/html/html/core/modules/node/src/NodeForm.php(138): Drupal\Core\Entity\ContentEntityForm->form() #9 /var/www/html/html/core/lib/Drupal/Core/Entity/EntityForm.php(107): Drupal\node\NodeForm->form() #10 [internal function]: Drupal\Core\Entity\EntityForm->buildForm() #11 /var/www/html/html/core/lib/Drupal/Core/Form/FormBuilder.php(528): call_user_func_array() #12 /var/www/html/html/core/lib/Drupal/Core/Form/FormBuilder.php(370): Drupal\Core\Form\FormBuilder->retrieveForm() #13 /var/www/html/html/core/lib/Drupal/Core/Form/FormBuilder.php(625): Drupal\Core\Form\FormBuilder->rebuildForm() #14 /var/www/html/html/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm() #15 /var/www/html/html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm() #16 /var/www/html/html/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult() #17 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult() #18 /var/www/html/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #19 /var/www/html/html/core/lib/Drupal/Core/Render/Renderer.php(593): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #20 /var/www/html/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #21 /var/www/html/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #23 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #24 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle() #25 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #26 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #27 /var/www/html/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #28 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #29 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #30 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #31 /var/www/html/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle() #32 /var/www/html/html/core/lib/Drupal/Core/DrupalKernel.php(709): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #33 /var/www/html/html/index.php(19): Drupal\Core\DrupalKernel->handle() #34 {main}
- 🇨🇦Canada web247 Toronto
And I don't see anything in the searchs results regarding this issue, I'll try reproducing the issue in other instances.
- 🇨🇦Canada web247 Toronto
It's strange, I am getting a different error in my Drupal.11.1.1 instance:
The website encountered an unexpected error. Try again later. TypeError: key(): Argument #1 ($array) must be of type array, null given in key() (line 424 of modules/contrib/entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php). Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget::processEntityBrowser() call_user_func_array() (Line: 1010) Drupal\Core\Form\FormBuilder->doBuildForm() (Line: 1073) Drupal\Core\Form\FormBuilder->doBuildForm() (Line: 1073) Drupal\Core\Form\FormBuilder->doBuildForm() (Line: 1073) Drupal\Core\Form\FormBuilder->doBuildForm() (Line: 571) Drupal\Core\Form\FormBuilder->processForm() (Line: 321) 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: 32) Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90) Drupal\page_cache\StackMiddleware\PageCache->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)
- 🇨🇦Canada smulvih2 Canada 🍁
Ok I found the solution to my issue reported above about the Entity Browser's Upload function. The error occurred when passing an array of file extensions to the validate() method, when it expects a string. This has been fixed in 5.4.x in
wxt_ext_media/src/Element/Upload.php
. I will push this fix to the 6.1.x branch tomorrow after doing some more tests on 5.4.x.Change: https://github.com/drupalwxt/wxt/commit/35732d056a0de75fb208f810ada6c441e149da87
- 🇨🇦Canada web247 Toronto
@danrod's changes for the layout_builder_st were rejected, so we are in the same position as we are in the first place, is there a similar module we can use?
Or perhaps creating a new one with less features but enough for what we need to release Wxt 6.1.0 D11
https://www.drupal.org/project/layout_builder_st/issues/3497945#comment-... 📌 Make coding standards fixes Active
If there are lots of tests that are failing, it means that this module was poorly written in the first place.
- 🇨🇦Canada smulvih2 Canada 🍁
Ya it's too bad core doesn't include this functionality, seem pretty important to have translations for layout builder blocks:
"This module provides the ability to translate the block labels and inline blocks that are added in the Layout Builder."
- 🇨🇦Canada joseph.olstad
Our option is to either follow exactly @phenaproximas requests or to fork layout_builder_st completely into a new project namespace.
I believe phenaproxima is ok with us commenting out the 4 tests however wants it done with a specific explanation in the comments and a followup issue. He's available on Slack to discuss with.
He left some suggestions, none of which rang any bells for me but I believe that we could convince him to move forward hopefully by resolving some of his concerns / comments. With that said, perhaps time to fork as we would like to cut a release in the next month or so.
- 🇨🇦Canada joseph.olstad
Use chrome to see the comments, Firefox will not load them for some reason
https://www.drupal.org/project/layout_builder_st/issues/3497945 📌 Make coding standards fixes Active
- 🇨🇦Canada web247 Toronto
The issue is that many of the tests that are failing are the ones that translate the block labels, for example in the file
tests/src/FunctionalJavascript/TranslationTest.php
after line 115:// Update the translations block label. $this->drupalGet('it/node/1/layout'); $this->assertNonTranslationActionsRemoved(); $this->updateBlockTranslation('.block-system-powered-by-block', 'untranslated label', 'label updated in translation', 'label in translation'); */ /* TOFIX:$assert_session->buttonExists('Save layout'); $page->pressButton('Save layout'); $assert_session->addressEquals('it/node/1'); $assert_session->pageTextContains('label updated in translation'); $assert_session->pageTextNotContains('label in translation');
so basically the module is not working at all or some patches need to be applied before fixing the tests.
I'll go for forking a light version of this.
- 🇨🇦Canada joseph.olstad
I spoke with @phenaproxima on Slack, preparing layout_builder_st as discussed with him.
- 🇨🇦Canada joseph.olstad
One down, one to go:
https://www.drupal.org/project/toc_api/releases/2.0.0 →
Next is lightning_builder_st , praying that phenaproxima goes ahead with some sort of a move forward. A branch, or even just a merge to dev.
- 🇨🇦Canada joseph.olstad
I'm in the process of testing this merge request.
- 🇨🇦Canada smulvih2 Canada 🍁
Might be worth revisiting https://www.drupal.org/project/drupal/issues/2946333 📌 Allow synced Layout override Translations: translating labels and inline blocks Needs work , see if the latest 11.x rebase works. Would be nice to just remove layout_builder_st. It's brutal that D11 doesn't have translations working for Layout Builder yet, and it was introduced in D8.
- 🇨🇦Canada joseph.olstad
The merge request appears to work, what is missing is the contextual translation link however I believe this is something caused by a change in core between 10.3 and 10.4 as the workaround that was made to use layout_builder_st with 10.2 is no longer providing the contextual translation link option. This is a core regression not caused by the layout_builder_st module.
🐛 Contextual links for translation are removed by core Active
with that said, the patch workaround appears to have no effect. I left it in the merge request just in case I'm missing something in my observation(s).
The merge request has been tested, I see no regression from 10.4 to 11.1 and no regression from the override modules to the contrib version. Layout builder is functioning as it was prior to the change.
This aligns us with contrib going forward and allows us to unblock our release.
I am wondering, for expediency do we release 6.1.0 or do we re-gig the versions to match core so the first D11 WxT release becomes 11.1.0 instead of 6.1.0. To be honest, the x.x.x only makes sense if the first number corresponds to a Drupal major.
- 🇨🇦Canada smulvih2 Canada 🍁
@joseph, I'm a bit lost with this patch:
"drupal/toc_filter": { "3455312 and 3540464 - D11 fix": "https://www.drupal.org/files/issues/2025-04-23/3455312-and-3520464-45.patch" }
This is a toc_filter patch added to a toc_api issue (#3455312) that has been marked as Fixed (it will not progress like this). You should create a toc_filter ticket for this so that it has a chance of being reviewed and merged into the toc_filter project. Also, I can't find issue #3540464 in any project, not sure what this is referring to.
- 🇨🇦Canada smulvih2 Canada 🍁
Actually this patch appears to be a copy of the PR from here - https://www.drupal.org/project/toc_filter/issues/3518549 🐛 Fatal error after updating to toc_api:^2 Active
- 🇨🇦Canada joseph.olstad
Yes sorry the patch description and patch name was in error, what I meant to do was
🐛 Fatal error after updating to toc_api:^2 Active
and
🐛 Layout builder fatal error Active
3518549-and-3520464-45.patchinstead of what I put in.
looks like you sorted it out, thanks!
- 🇨🇦Canada smulvih2 Canada 🍁
@joseph I merged your PR and ran test against it, see failures - https://github.com/drupalwxt/wxt/actions/runs/14644362578
Also testing this in my local I get this error:
The website encountered an unexpected error. Try again later.
TypeError: Drupal\layout_builder_st\DependencyInjection\ClassResolver::__construct(): Argument #1 ($decorated) must be of type Drupal\Core\DependencyInjection\ClassResolverInterface, Drupal\Core\DependencyInjection\Container given, called in /var/www/html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\layout_builder_st\DependencyInjection\ClassResolver->__construct() (line 14 of modules/contrib/layout_builder_st/src/DependencyInjection/ClassResolver.php).Sorry I thought your PR branch had already ran against the tests, but it appears not. Your PR is marked as Merged, although it has been reverted from 6.1.x, so you will need to reopen a PR and run the tests against it to make sure things work. Thanks!
- 🇨🇦Canada joseph.olstad
@smulvih2 , yes that exception is expected,
drush updb
will fix it. No amount of cache rebuild will fix this, the only way to fix is by running updb or to truncate all cache_* tables. - 🇨🇦Canada joseph.olstad
That failure makes no sense. , where is it getting another directive for layout_builder_st from?