The "fake_block_content" entity type does not exist

Created on 16 June 2023, over 1 year ago
Updated 19 June 2023, over 1 year ago

Problem/Motivation

If I enable bootstrap_layouts in a functional test, the following error appears on site output when the test is run:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "fake_block_content" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

This is the test:

    $this->drupalGet('');
    $this->assertSession()->statusCodeEquals(200);

The status code is 500 and the HTML output page shows the error above.

Depending on details of how the test is setup, the content type that it says is missing can be different.

I only see problems like this inside functional tests. The module works as expected in general use. Any suggestions as to what the problem could be?

💬 Support request
Status

Active

Version

5.3

Component

Code

Created by

🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Liam Morland
  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    It would be a good idea to enable automated tests for bootstrap_layouts. It would help track down the problem to see whether or not this issue appears here. Even if there are no tests running tests will check of it builds successfully.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    If I make a completely empty functional test and enable bootstrap_layouts in it, I get this error when running tests:

    1) Drupal\Tests\bc_dc\Functional\BcDcFunctionalTest::test
    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "block_content_type" entity type does not exist.

    The tests pass if I comment-out the following from BootstrapLayoutsPluginManager::__construct():

    // Replace the namespaces data.
    $namespaces->exchangeArray($ns);
    
Production build 0.71.5 2024