Can’t install when using Menu Item Extras module
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2983434. -->
Reported by: [jproctor](https://www.drupal.org/user/1194192)
>>>
<p>When I have the <a href="https://www.drupal.org/project/menu_item_extras">Menu Item Extras</a> module enabled, attempting to enable Menu Entity Index (8.x-1.x-dev + external url patch, core 8.5.4) fails:</p>
<pre>$ drush en menu_entity_index --yes<br>The following extensions will be enabled: menu_entity_index<br>Do you really want to continue? (y/n): y<br>Error: Maximum function nesting level of '256' reached, aborting! in /app/web/core/lib/Drupal/Core/Cache/ApcuBackend.php on line 68 #0 /app/web/core/lib/Drupal/Core/Cache/ApcuBackend.php(87): Drupal\Core\Cache\ApcuBackend->getApcuKey('entity_type')<br>#1 /app/web/core/lib/Drupal/Core/Cache/ChainedFastBackend.php(141): Drupal\Core\Cache\ApcuBackend->getMultiple(Array, false)<br>#2 /app/web/core/lib/Drupal/Core/Cache/ChainedFastBackend.php(103): Drupal\Core\Cache\ChainedFastBackend->getMultiple(Array, false)<br>#3 /app/web/core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php(37): Drupal\Core\Cache\ChainedFastBackend->get('entity_type')<br>#4 /app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(207): Drupal\Core\Plugin\DefaultPluginManager->cacheGet('entity_type')<br>#5 /app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(173): Drupal\Core\Plugin\DefaultPluginManager->getCachedDefinitions()<br>#6 /app/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()<br>#7 /app/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(130): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('menu', false)<br>#8 /app/web/modules/contrib/menu_entity_index/menu_entity_index.module(135): Drupal\Core\Entity\EntityTypeManager->getDefinition('menu')<br>#9 /app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): menu_entity_index_entity_type_alter(Array, NULL, NULL)<br>#10 /app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(333): Drupal\Core\Extension\ModuleHandler->alter('entity_type', Array)<br>#11 /app/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(117): Drupal\Core\Plugin\DefaultPluginManager->alterDefinitions(Array)<br>#12 /app/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Entity\EntityTypeManager->findDefinitions()</pre><p>... after which #6 through #12 repeat until Drush gives up.</p>
<p>I genuinely can’t tell whether it’s that module doing something it shouldn’t with the bundle label (thereby creating an infinite loop) or whether it’s this one that needs to be a little smarter about how it finds a default value if there’s not already one set. Or some of both.</p>
<p>As I read the code for <code>menu_entity_index_entity_type_alter()</code>, I don’t see that the computed <code>$bundle_label</code> is actually used anywhere, so it’s sufficient for me right now to comment out the first conditional. But I wanted to report it in case someone else has the problem, and maybe eventually I (or someone else) will track down what’s going wrong.</p>
issue