Problem/Motivation

The Layout builder module does not protect against recursion. If a Block Plugin which renders an entity is placed inside the same entity's layout, you will receive "Maximum function nesting level" errors. This was originally reported in #2976152: Don't allow placing a Custom Block in the layout override for itself or a default layout, and is being mitigated in that issue by hiding known Block Plugins that cause this issue.

Steps to reproduce

We can work over the default "basic page" content type
1. Create a node for basic page content type.
2. Enable the core module "Layout Builder"
3. Create a view to show basic pages as a block:
- With contextual filter by "content ID"
- With a show as "content" and display as "default"
4. Alter the basic page "manage display" to show "default" as "layout builder"
5. Add to layout builder the block that you created at 3 step.
6. Show the node that you created at 1 step and should get the error "The website encountered an unexpected error. Please try again later." and at drupal log this is "Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in Drupal\Component\Plugin\PluginBase->__construct() (line 53 of /var/www/html/contributedrupal10/core/lib/Drupal/Component/Plugin/PluginBase.php)."

Proposed resolution

The mitigation is fine for now, but the Layout builder should have higher level recursion protection, similar to what the Entity Reference formatter does today.

Remaining tasks

Write a patch and tests.

User interface changes

None.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#108 2979184-108--reroll-11.x.patch42.31 KBrobert-arias
#105 2979184-105-reroll-10-3.patch22.02 KBkevinquillen
#104 2979184-104-reroll-10-3.patch9.22 KBkevinquillen
#101 2979184-nr-bot.txt9.72 KBneeds-review-queue-bot
#90 diff-90-87.patch1014 bytesvacho
#90 2979184-90.patch37.23 KBvacho
#87 diff-83-87.patch985 bytesvacho
#87 2979184-87.patch37.21 KBvacho
#83 interdiff_81-83.txt7.67 KBdk-massive
#83 2979184-83.patch37.28 KBdk-massive
#81 interdiff_79-81.txt2.04 KBdk-massive
#81 2979184-81.patch37.4 KBdk-massive
#79 interdiff_76-79.txt4.57 KBdk-massive
#79 2979184-79.patch35.36 KBdk-massive
#76 2979184-76.patch31.5 KBnikhil_110
#76 interdiff_75-76.txt577 bytesnikhil_110
#75 2979184-75.patch31.76 KBvacho
#74 2979184-74.patch31.89 KBvacho
#73 2979184-73.patch31.7 KBvacho
#72 2979184-72.patch31.39 KBvacho
#69 2979184-69.patch30.93 KBvacho
#65 2979184-65.patch32.86 KBsuresh prabhu parkala
#64 2979184-63.patch32.76 KBanchal_gupta
#64 interdiff-54-62_63.txt1.4 KBanchal_gupta
#62 interdiff_54-62.txt2.23 KBjoshmiller
#62 2979184-62.patch32.75 KBjoshmiller
#54 interdiff_51-54.txt1.2 KBravi.shankar
#54 2979184-54.patch32.77 KBravi.shankar
#51 interdiff-2979184-49-51.txt1.16 KBmrinalini9
#51 2979184-51.patch32.76 KBmrinalini9
#49 interdiff-45-49.txt9.4 KBhardik_patel_12
#49 2979184-49.patch32.78 KBhardik_patel_12
#45 interdiff_40-45.txt998 bytesswatichouhan012
#45 2979184-45.patch32.77 KBswatichouhan012
#40 interdiff_36-40.txt1.66 KBswatichouhan012
#40 2979184-40.patch31.63 KBswatichouhan012
#36 interdiff-29-36.txt2.28 KBhardik_patel_12
#36 2979184-36.patch31.3 KBhardik_patel_12
#34 2979184-34.patch30.57 KBdhirendra.mishra
#34 interdiff_29-34.txt1.49 KBdhirendra.mishra
#29 interdiff-25-29.txt5.82 KBhardik_patel_12
#29 2979184-29.patch30.3 KBhardik_patel_12
#28 2979184-28.patch31.52 KBaleevas
#25 interdiff-23-25.txt4.18 KBaleevas
#25 2979184-25.patch29.47 KBaleevas
#23 interdiff_20_23.txt11.4 KBaleevas
#23 2979184-23.patch28.83 KBaleevas
#20 2979184-20.patch28.97 KBbnjmnm
#20 interdiff_19-20.txt6.46 KBbnjmnm
#20 2979184-20-test-only-FAIL.patch19.95 KBbnjmnm
#19 2979184-19.patch23.74 KBbnjmnm
#19 interdiff_14-19.txt3.77 KBbnjmnm
#19 2979184-19-test-only.patch19.55 KBbnjmnm
#19 interdiff_14-19.txt3.77 KBbnjmnm
#19 2979184-19.patch23.74 KBbnjmnm
#19 2979184-19-test-only.patch19.55 KBbnjmnm
#14 2979184-14.patch22.62 KBbendeguz.csirmaz
#9 2979184-recursion-9.patch22.99 KBtedbow
#6 2979184-6.patch23 KBtedbow
#4 2979184-4.patch22.97 KBtedbow
#4 2979184-4.patch22.97 KBtedbow
#2 2979184-2.patch4.36 KBsamuel.mortenson

Issue fork drupal-2979184

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

samuel.mortenson created an issue. See original summary.

samuel.mortenson’s picture

Status: Active » Needs review
StatusFileSize
new4.36 KB

I didn't have time to find a fix for this, but here's a failing test.

Status: Needs review » Needs work

The last submitted patch, 2: 2979184-2.patch, failed testing. View results

tedbow’s picture

Status: Needs work » Needs review
StatusFileSize
new22.97 KB
new22.97 KB

@samuel.mortenson didn't know you were working on this 😉

Including my fix and test and your test.

The last submitted patch, 4: 2979184-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tedbow’s picture

StatusFileSize
new23 KB

comedy of errors today 🎭

I also forgot group.

The last submitted patch, 4: 2979184-4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 6: 2979184-6.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

tedbow’s picture

Status: Needs work » Needs review
StatusFileSize
new22.99 KB

Just removing some debug code I left in.

Not sure why Drupal\Tests\layout_builder\Kernel\LayoutBuilderFieldLayoutCompatibilityTest::testCompatibility is failing

Status: Needs review » Needs work

The last submitted patch, 9: 2979184-recursion-9.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

xjm’s picture

This mitigation presumably works for core plugins, but what about contrib? If it's not mitigated by a contrib plugin that has the issue, then I think this'd be a major bug.

tim.plunkett’s picture

Priority: Normal » Major
bendeguz.csirmaz’s picture

StatusFileSize
new22.62 KB

Here's a reroll of #9.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tim.plunkett’s picture

Issue tags: +Blocks-Layouts
bnjmnm’s picture

The test failures for Drupal\Tests\layout_builder\Kernel\LayoutBuilderFieldLayoutCompatibilityTest::testCompatibility and Drupal\Tests\layout_builder\Kernel\LayoutBuilderInstallTest::testCompatibility are due to assertFieldAttributes() being called on the same entity multiple times in a the same Kernel test. It renders the entity as part of the test, and since those calls are part of the same request, the recursion counter increases and prevents rendering on any calls after the first.

I'm not yet sure how to best address this. It could be resolved by converting the tests to Functional, but I'd like to be sure there isn't a more straightforward option before doing that much refactoring and slowing down the tests.

tim.plunkett’s picture

If performance is that much of a concern, the test could use reflection to make the counter public and reset it.

bnjmnm’s picture

Status: Needs work » Needs review
StatusFileSize
new19.55 KB
new23.74 KB
new3.77 KB
new19.55 KB
new3.77 KB
new23.74 KB

I rerolled the patch and fixed the test failures, which is uploaded here.

I then checked to see if the tests added by this issue still failed without the fix. They do not fail locally - adding a test only patch to confirm that is the case overall. It's not yet clear if the tests need to be rewritten or if this issue was fixed as a result of another recent change. Sharing the results here to see if someone may be aware of a recent commit that may have addressed this.

bnjmnm’s picture

StatusFileSize
new19.95 KB
new6.46 KB
new28.97 KB

In this patch:

  1. Identified and addressed what needed to be changed so both the Functional and Kernel tests would fail without the rest of the patch (largely consisted of explicity enabling layout builder for the display being tested.
  2. Discovered the current patch did not have protection for the Views use case in the Functional tests, so I added recursion protection logic for views blocks in Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray
  3. In manual testing I discovered the recursion testing can potentially trigger an error in the quickedit integration, and added a safeguard to prevent it

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

jhedstrom’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch in #20 no longer applies.

It would be good to re-upload a test-only patch as well since the one in #20 never ran.

aleevas’s picture

Status: Needs work » Needs review
StatusFileSize
new28.83 KB
new11.4 KB

Rerolled patch from 20

Status: Needs review » Needs work

The last submitted patch, 23: 2979184-23.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

aleevas’s picture

Status: Needs work » Needs review
StatusFileSize
new29.47 KB
new4.18 KB

Next patch for fix it

Percy101’s picture

Issue tags: -Needs reroll

I could apply the patch, so no reroll is needed

tim.plunkett’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
    @@ -483,6 +507,48 @@ protected function getDefaultSection() {
    +    if ($entity instanceof RevisionableInterface) {
    +      $render_id_values['%revision_id'] = $entity->getRevisionId();
    +    }
    

    Why revision? I don't believe LB uses revisions this way. Also, why not use the getTempstoreKey() method on section storage? That takes into account language, which this doesn't.

  2. +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
    @@ -483,6 +507,48 @@ protected function getDefaultSection() {
    +      $error = 'Recursive rendering detected when rendering layout:';
    ...
    +      $this->getLogger()->error("$error. Aborting rendering.", $render_id_values);
    

    Which logger is this? Also, while exception messages aren't translated, I believe logged messages are supposed to be.

  3. +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -137,7 +157,53 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) {
    +      if ($block instanceof ViewsBlock) {
    +        $this->checkForViewsBlockRecursion($block, $bypass_build);
    +      }
    +
    +      if (!$bypass_build) {
    +        $event->setBuild($build);
    +      }
    +
    

    Instead of embedding Views-specific logic here, what about another event subscriber dedicated to this? And if recursion is detected, it stops the event from propagating?

  4. +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -137,7 +157,53 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) {
    +    list($is_displaying,) = explode(':', $row_plugin->getPluginId(), 2);
    

    I don't believe the trailing comma is necessary. Also instead of using list(), could dereference the explode with [0]

  5. +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -137,7 +157,53 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) {
    +    if ($is_displaying == 'entity') {
    

    === please

  6. +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -137,7 +157,53 @@ public function onBuildRender(SectionComponentBuildRenderArrayEvent $event) {
    +            \Drupal::logger('system')->error($error);
    

    Is this a system error? Why not use the LB logger (and inject it?)

  7. +++ b/core/modules/layout_builder/src/QuickEditIntegration.php
    @@ -129,7 +129,11 @@ public function entityViewAlter(array &$build, EntityInterface $entity, EntityVi
    +      // Recursion protection makes it possible for there to be a $section
    +      // without a '#layout' key. Skip when this is the case.
    +      if (!isset($section['#layout'])) {
    +        continue;
    +      }
           if (!Element::isEmpty($section)) {
    

    This is no longer needed after #3065474: An error occurs when viewing an entity after removing all layout sections and Quickedit module enabled.

  8. +++ b/core/modules/layout_builder/tests/src/Functional/LayoutRecursionTest.php
    @@ -0,0 +1,71 @@
    +class LayoutRecursionTest extends BrowserTestBase {
    +  /**
    +   * {@inheritdoc}
    +   */
    +  public static $modules = [
    

    Nit, missing a blank line and this should be protected

  9. +++ b/core/modules/layout_builder/tests/src/Functional/LayoutRecursionTest.php
    @@ -0,0 +1,71 @@
    +  protected $defaultTheme = 'classy';
    

    Please rewrite the test to use stark

  10. +++ b/core/modules/layout_builder/tests/src/Functional/LayoutRecursionTest.php
    @@ -0,0 +1,71 @@
    +   * @throws \Behat\Mink\Exception\ResponseTextException
    

    Don't usually see this in test methods, why is it here?

  11. +++ b/core/modules/layout_builder/tests/src/Functional/LayoutRecursionTest.php
    @@ -0,0 +1,71 @@
    +    $assert_session->pageTextContains("List all nodes");
    

    Nit: switch to single quotes

  12. +++ b/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
    @@ -48,7 +49,7 @@ protected function setUp() {
    -    $this->config('system.theme')->set('default', 'classy')->save();
    +    $this->config('system.theme')->set('default', 'classy')->save();  $this->config('system.theme')->set('default', 'classy')->save();
    

    Remove this, please

  13. +++ b/core/modules/layout_builder/tests/src/Kernel/SectionComponentRecursionTest.php
    @@ -0,0 +1,79 @@
    +  public static $modules = [
    

    Nit: protected

aleevas’s picture

StatusFileSize
new31.52 KB

Added fix for 5-13 notices from #27
Still needs work on 1-4

hardik_patel_12’s picture

StatusFileSize
new30.3 KB
new5.82 KB

Reapplying #28 patch. solving error of

error: cannot apply binary patch to 'modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/.DS_Store' without full index line
error: modules/contrib/admin_toolbar/admin_toolbar_tools/src/Plugin/.DS_Store: patch does not apply"
hardik_patel_12’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 29: 2979184-29.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

bnjmnm’s picture

  1. +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
    @@ -482,6 +506,48 @@ protected function getDefaultSection() {
    +      $this->getLogger()->error("$error. Aborting rendering.", $render_id_values);
    

    Another instance of $this->getLogger() that should be replaced with an injected logger, and the string translated.

  2. +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -33,14 +36,41 @@ class BlockComponentRenderArray implements EventSubscriberInterface {
    +  public function __construct(AccountInterface $current_user, LoggerInterface $logger) {
         $this->currentUser = $current_user;
    +    $this->logger = $logger;
    

    Tests are failing because a new argument was added to the constructor without a default value. An example of how to do this can be found at \Drupal\layout_builder\Controller\ChooseBlockController::__construct, look at the $current_user variable is implemented.

dhirendra.mishra’s picture

Assigned: Unassigned » dhirendra.mishra

let me pick up this....

dhirendra.mishra’s picture

Assigned: dhirendra.mishra » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.49 KB
new30.57 KB

Please review this as this addresses above comment.

Status: Needs review » Needs work

The last submitted patch, 34: 2979184-34.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

hardik_patel_12’s picture

Status: Needs work » Needs review
StatusFileSize
new31.3 KB
new2.28 KB

Covered points mentioned in #32, kindly review a new patch.

Status: Needs review » Needs work

The last submitted patch, 36: 2979184-36.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

bnjmnm’s picture

  • +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
    @@ -482,6 +506,49 @@ protected function getDefaultSection() {
    +      $error = $this->t("$error. Aborting rendering.");
    

    t() is not automatically available in this class. It can be made available with Drupal\Core\StringTranslation\StringTranslationTrait;

    Also, this function should not be concatenating a string with variables, use placeholders instead.
    https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Rend...

  • +++ b/core/modules/layout_builder/layout_builder.services.yml
    @@ -42,7 +42,7 @@ services:
    +    arguments: ['@current_user', '@logger.channel.layout_builder']
    
    +++ b/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php
    @@ -33,14 +36,45 @@ class BlockComponentRenderArray implements EventSubscriberInterface {
    +  public function __construct(AccountInterface $current_user, LoggerInterface $logger = NULL) {
    

    This change looks good. Some of the test failures in the patch are because the unit tests need to be updated so the new LoggerInterface arg is taken into account. Instances of new BlockComponentRenderArray(), need the logger argument added.

swatichouhan012’s picture

Assigned: Unassigned » swatichouhan012
swatichouhan012’s picture

StatusFileSize
new31.63 KB
new1.66 KB

I have covered point first of #36, and also fixed coding issues of patch.

swatichouhan012’s picture

Assigned: swatichouhan012 » Unassigned
dhirendra.mishra’s picture

Status: Needs work » Needs review
hardik_patel_12’s picture

Needs to include logger argument in instances of new BlockComponentRenderArray() in failed test files.

Status: Needs review » Needs work

The last submitted patch, 40: 2979184-40.patch, failed testing. View results

swatichouhan012’s picture

Status: Needs work » Needs review
StatusFileSize
new32.77 KB
new998 bytes

Added logger variable in test files, lets see if test got pass.

Status: Needs review » Needs work

The last submitted patch, 45: 2979184-45.patch, failed testing. View results

bnjmnm’s picture

Thanks @swatichouhan012

+++ b/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php
@@ -60,6 +60,7 @@ protected function setUp() {
     $this->account = $this->prophesize(AccountInterface::class);
+    $logger = $this->container->get('logger.channel.layout_builder');

The logger should be added similar to how $this->account is added. It will look something like $this->prophesize(LoggerInterface::class)

When working with tests, you may find it easier to set up tests locally instead of waiting over an hour for DrupalCI to run the full test suite. A unit test like this will run in seconds. Here's addiitonal info on running tests from the command line. If you have PHPStorm, integrating PHPUnit tests makes it even easier to test locally.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

hardik_patel_12’s picture

Status: Needs work » Needs review
StatusFileSize
new32.78 KB
new9.4 KB

Solving failed test cases.

tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/core/modules/layout_builder/tests/modules/layout_builder_recursive_test/config/install/views.view.list_all_nodes.yml
@@ -0,0 +1,165 @@
+#core: 8.x

+++ b/core/modules/layout_builder/tests/modules/layout_builder_recursive_test/layout_builder_recursive_test.info.yml
@@ -0,0 +1,8 @@
+core: 8.x

Must be removed

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new32.76 KB
new1.16 KB

Removed core: 8.x from #49 as mentioned in #50, please review.

Status: Needs review » Needs work

The last submitted patch, 51: 2979184-51.patch, failed testing. View results

ravi.shankar’s picture

Assigned: Unassigned » ravi.shankar

Working on this.

ravi.shankar’s picture

Assigned: ravi.shankar » Unassigned
Status: Needs work » Needs review
StatusFileSize
new32.77 KB
new1.2 KB

Here I have tried to fix failed tests.

Status: Needs review » Needs work

The last submitted patch, 54: 2979184-54.patch, failed testing. View results

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

fskreuz’s picture

Currently, I have one menu that's placed twice on the page (a problem on its own, but that's what I have at the moment). The menu also uses Menu Item Extras so that we can build a mega menu with one of the instances. Left alone, the setup would generate the warnings because:

1. Menu Item Content instances (the menu links) generate the same $recursive_render_id towards the same thing, instead of two independent renders of the link from two separate instances of the menu.
2. The Menu Item Extras's use of the render twig filter to check for an empty render array. This also generates the same $recursive_render_id and counts towards the same thing, should the render filter encounter that same link.

In total, I would get 4 warnings for just one menu item (2 links x 2 twig render). Do that for each menu link in the menu, and my db log is flooded with warnings. The first case (separate renders counted the same) is something that could easily be done with other entities via other methods (e.g. two views rendering the same entity with the same display). And the use of render in twig is a known workaround in themes.

I have not found a solution on my end. This may be a non-issue even (I could be doing it wrong?). Just posting my findings.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tim.plunkett’s picture

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

joshmiller’s picture

StatusFileSize
new32.75 KB
new2.23 KB

Re-roll against 9.3.6 ...

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

anchal_gupta’s picture

StatusFileSize
new1.4 KB
new32.76 KB

Re-roll against #62. please review it.

suresh prabhu parkala’s picture

StatusFileSize
new32.86 KB

Patch did not apply. Here is the re-roll. Please review.

andrea.cividini’s picture

I had patch #65 already applied to my project and I applied patch #8 from this ticket https://www.drupal.org/project/drupal/issues/2940605#comment-14687218 and they seemed to conflict.
After applying the new patch, the LB protection mechanism provided by patch #65 was blocking all the rendering.
After removing patch #65 I was able to do batch rendering without any error log or message.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vacho’s picture

I apply the patch $65 but I have this issue on browser:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/web/core/lib/Drupal/Core/Utility/Error.php on line 1

vacho’s picture

StatusFileSize
new30.93 KB

I rerolled and fixed these items:
- Core module quickedit has been removed https://www.drupal.org/node/3252839

dk-massive’s picture

In a site I am managing, patches 65 and 69 causes Paragraphs using Layout Builder in their view mode to not render their content.

vacho’s picture

Issue summary: View changes
vacho’s picture

StatusFileSize
new31.39 KB

I fixed some test issues here

Als @dk-massive, following the task steps and last patch I got fixed this issue.

vacho’s picture

StatusFileSize
new31.7 KB

I fixed another test issues

vacho’s picture

StatusFileSize
new31.89 KB
vacho’s picture

StatusFileSize
new31.76 KB

Fixing some another testing issues.

nikhil_110’s picture

StatusFileSize
new577 bytes
new31.5 KB

Fixing Cs Issue #75

nikhil_110’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Test failures.

dk-massive’s picture

Status: Needs work » Needs review
StatusFileSize
new35.36 KB
new4.57 KB

Fixed test issue.

Status: Needs review » Needs work

The last submitted patch, 79: 2979184-79.patch, failed testing. View results

dk-massive’s picture

StatusFileSize
new37.4 KB
new2.04 KB

fix testing issue

dk-massive’s picture

Status: Needs work » Needs review
dk-massive’s picture

StatusFileSize
new37.28 KB
new7.67 KB

fix test. adjust test to use prophesize for logger service.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs change record

trigger_error messages will have to be updated. Currently says D9

Also a change record will be needed for the new parameter in the service.

vacho’s picture

About to trigger_error message there is one a core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php that is:

      @trigger_error('The logger.channel.layout_builder service must be passed to BlockComponentRenderArray::__construct(), it is required before Drupal 9.0.0.', E_USER_DEPRECATED);

As I see says "It is required before Drupal 9.0.0" I don't think is needed to change the core version to 10 in this message. D9 is still in production, also the message says "before...".

smustgrave’s picture

9.0.0 is no longer supported. Hasn’t been for some time.

Also can’t be made required in a minor release which this would be. So would have to be done in a major release. So if this trying to get in for 10.1 or would have to be triggered in 10.1 and required in 11

vacho’s picture

StatusFileSize
new37.21 KB
new985 bytes

Ok, @smustgrave sounds logic.

I modified the @trigger_error message.

About "change record" for the service. I think this should be added to this list manually https://www.drupal.org/list-changes/drupal

after or at the time that this issue merged.

vacho’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Thanks but still needs a change record that will be added to the trigger_error.

Thought there was a check for it but the trigger_error follows a pattern

Example

   if ($extension_list_theme === NULL) {
      @trigger_error('Calling ' . __METHOD__ . ' without the $extension_list_theme argument is deprecated in drupal:10.1.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3284397', E_USER_DEPRECATED);
      $extension_list_theme = \Drupal::service('extension.list.theme');
    }
vacho’s picture

StatusFileSize
new37.23 KB
new1014 bytes

Ahh, thanks @smustgrave for the guides.

I think was fixed. Pleas review.

vacho’s picture

Status: Needs work » Needs review

The last submitted patch, 90: 2979184-90.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

liam morland’s picture

smustgrave’s picture

Status: Needs review » Needs work

Unfortunately missed the 10.1 for deprecation. If those can be updated fir 10.2 please.

kevinquillen’s picture

The patches #90 fixed the problem for me.

kevinquillen’s picture

Patch no longer applies to 10.3.x.

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

gauravvvv’s picture

Status: Needs work » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new9.72 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Mithun S made their first commit to this issue’s fork.

mithun s’s picture

Fixed some of the issues related to pipeline and added a commit for the same MR. Still some of the tests are getting failed, keeping the issue status as unchanged.
Thanks!!.

kevinquillen’s picture

StatusFileSize
new9.22 KB

Last patch does not apply to 10.3. Attaching one for 10.3 (I need it).

kevinquillen’s picture

StatusFileSize
new22.02 KB

Re-upping patch from #104 with new files included.

kevinquillen’s picture

robert-arias made their first commit to this issue’s fork.

robert-arias’s picture

StatusFileSize
new42.31 KB

MR patch for 11.2.x support

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.