The Drupal\ad_content\Entity\AdContentType class does not correspond to an entity type. in Drupal\Core\Entity\EntityTypeRepository->getEntityTypeFromClass()

Created on 13 July 2025, 10 days ago

Problem/Motivation

Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException: The Drupal\ad_content\Entity\AdContentType class does not correspond to an entity type. in Drupal\Core\Entity\EntityTypeRepository->getEntityTypeFromClass() (line 115 of core/lib/Drupal/Core/Entity/EntityTypeRepository.php).

Drupal\Core\Entity\EntityBase::loadMultiple() (Line: 27)
ad_content_entity_extra_field_info() (Line: 114)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 100)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 103)
Drupal\hux\HuxModuleHandler->invokeAllWith() (Line: 113)
Drupal\hux\HuxModuleHandler->invokeAll() (Line: 692)
Drupal\Core\Entity\EntityFieldManager->loadExtraFields() (Line: 665)
Drupal\Core\Entity\EntityFieldManager->getExtraFields() (Line: 173)
Drupal\Core\Entity\EntityDisplayBase->init() (Line: 155)
Drupal\Core\Entity\EntityDisplayBase->__construct() (Line: 148)
Drupal\Core\Entity\Entity\EntityFormDisplay->__construct() (Line: 418)
Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords() (Line: 194)
Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple() (Line: 312)
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 262)
Drupal\Core\Entity\EntityStorageBase->load() (Line: 354)
social_profile_privacy_private_fields_list() (Line: 399)
social_profile_privacy_entity_field_access() (Line: 354)
Drupal\Core\Entity\EntityAccessControlHandler->Drupal\Core\Entity\{closure}() (Line: 100)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 103)
Drupal\hux\HuxModuleHandler->invokeAllWith() (Line: 351)
Drupal\Core\Entity\EntityAccessControlHandler->fieldAccess() (Line: 801)
social_profile_social_user_name_display_suggestions() (Line: 114)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 100)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 103)
Drupal\hux\HuxModuleHandler->invokeAllWith() (Line: 113)
Drupal\hux\HuxModuleHandler->invokeAll() (Line: 659)
social_user_user_format_name_alter() (Line: 552)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 163)
Drupal\hux\HuxModuleHandler->alter() (Line: 184)
Drupal\Core\Session\UserSession->getDisplayName() (Line: 163)
Drupal\Core\Session\AccountProxy->getDisplayName() (Line: 1175)
user_toolbar() (Line: 114)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 100)
Drupal\hux\HuxModuleHandler->Drupal\hux\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 103)
Drupal\hux\HuxModuleHandler->invokeAllWith() (Line: 113)
Drupal\hux\HuxModuleHandler->invokeAll() (Line: 78)
Drupal\toolbar\Element\Toolbar::preRenderToolbar()
call_user_func_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 886)
Drupal\Core\Render\Renderer->doCallback() (Line: 431)
Drupal\Core\Render\Renderer->doRender() (Line: 503)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 108)
__TwigTemplate_e80cdcb1713d444f72ece057fd412d3c->doDisplay() (Line: 388)
Twig\Template->yield() (Line: 344)
Twig\Template->display() (Line: 359)
Twig\Template->render() (Line: 51)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 54)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 43)
Drupal\webform_product\RedirectMiddleware->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: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

When trying to enable the ad_content module I get the above WSOD error.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

11.0

Component

ad module

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

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

Comments & Activities

  • Issue created by @SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    It is always optimal to provide the changes made for this issue in an MR, so I will do that quickly and then take a look.

  • @lrwebks opened merge request.
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    The patch provided is not the solution that we want. Simply reverting the new Attributes to old Annotations is a step backward (and backward is always the wrong direction. :)) I'll see if I can reproduce this, since I never ran into that issue before.

  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    I currently cannot reproduce the WSOD with the newest development version on the 11.x branch. @socialnicheguru, if you haven't already, could you also try again using the newest dev version to see if we have (accidentally) fixed it in the meantime? Also (if it isn't too much effort), could you try the installation on 11.x as well, to see if it is a Drupal 10 problem? Thank you in advance!

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    I am on 10.5.x. Could that be the issue? Maybe it is not backward compatible.

  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    @socialnicheguru: Okay, tested it on 10.5.1 and getting a similar error after installing ad_content with the same cause as your issue. Yes, in Drupal 10.5.x there is no attribute class for content and config entity types yet, only annotations. Meaning: Your patch is technically the correct and only solution to the problem.

    However, I really am against removing the new attributes in favor of this issue. @anybody, what do you think? We are now faced with the decision of removing progress or removing backward compatibility... What is the best step here in your option?

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @lrwebks and @socialnicheguru as 11.x is still in alpha, I'd vote for removing Drupal 10 compatibility in the module and all submodules and start with 11.x. Sooner or later we'll all land there and that's what alpha is for.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • πŸ‡©πŸ‡ͺGermany lrwebks Porta Westfalica

    @anybody: +1 for that from me! So should I remove the versions from the info.yml in here, or should we close this as outdated?

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @lrwebks please use the separate branch: https://git.drupalcode.org/issue/ad-3535692/-/tree/3535692-remove-d10-co...
    That's always a good idea to keep other peoples work and makes a lot of sense for such cases where the approach is totally different.

    BTW. then 11.x module version also makes more sense... :D

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @socialnicheguru if you desperately need 10.x compatibility, you could create a separate issue and change compatibility issues there, I'd be open to use the 10.x branch for a limited copy of 11.x that works with Drupal 10!

Production build 0.71.5 2024