Missing required data for typed configuration: content_redirect_to_front.settings in Drupal\Core\Config\TypedConfigManager->get() (line 85 of core/lib/Drupal/Core/Config/TypedConfigManager.php).

Created on 6 December 2024, about 2 months ago

Problem/Motivation

While working with two websites that were updated to version 10, one was upgraded from Drupal 9 to 10, and the other β€” I'm not sure, but I think it was updated from Drupal 7 to 10.

Steps to reproduce

The websites work flawlessly. I decided to install the content_redirect_to_front module via Composer. It installed correctly, and I enabled it through the admin interface without issues. However, when I tried to configure the module, I encountered an error on both sites. The only thing the sites have in common is that they were both updated to Drupal 10.

The website encountered an unexpected error. Try again later.

InvalidArgumentException: Missing required data for typed configuration: content_redirect_to_front.settings in Drupal\Core\Config\TypedConfigManager->get() (line 85 of core/lib/Drupal/Core/Config/TypedConfigManager.php).

Drupal\config_translation\ConfigMapperManager->hasTranslatable('content_redirect_to_front.settings') (Line: 457)
Drupal\config_translation\ConfigNamesMapper->hasTranslatable() (Line: 110)
Drupal\config_translation\Access\ConfigTranslationOverviewAccess->doCheckAccess(Object, Object, NULL) (Line: 70)
Drupal\config_translation\Access\ConfigTranslationOverviewAccess->access(Object, Object)
call_user_func_array(Array, Array) (Line: 160)
Drupal\Core\Access\AccessManager->performCheck('config_translation.access.overview', Object) (Line: 136)
Drupal\Core\Access\AccessManager->check(Object, Object, NULL, 1) (Line: 93)
Drupal\Core\Access\AccessManager->checkNamedRoute('config_translation.item.overview.content_redirect_to_front.settings', Array, Object, 1) (Line: 327)
Drupal\Core\Menu\LocalTaskManager->getTasksBuild('content_redirect_to_front.settings', Object) (Line: 358)
Drupal\Core\Menu\LocalTaskManager->getLocalTasks('content_redirect_to_front.settings', 0) (Line: 106)
Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array('Drupal\blocache\BlocacheViewBuilder::preRender', Array) (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\blocache\BlocacheViewBuilder::preRender', Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 870)
Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\blocache\BlocacheViewBuilder::preRender', Array) (Line: 432)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 504)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
Drupal\Core\Render\Renderer->render(Array) (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 58)

Here is a link to the screenshot.

πŸ› Bug report
Status

Active

Version

9.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine godsman

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

Merge Requests

Comments & Activities

  • Issue created by @godsman
  • @godsman On my Drupal 10.4 site, I am unable to replicate this issue.
    Kindly uninstall and remove the module and then require the module again through composer : composer require 'drupal/content_redirect_to_front:^9.0' & then enable the module through admin interface. This will proably fix the issue.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    According to this a module called "blocache" is installed on the site: https://www.drupal.org/project/blocache β†’

    call_user_func_array('Drupal\blocache\BlocacheViewBuilder::preRender', Array) (Line: 113)
    Drupal\Core\Render\Renderer->doTrustedCallback('Drupal\blocache\BlocacheViewBuilder::preRender', Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 870)
    Drupal\Core\Render\Renderer->doCallback('#pre_render', 'Drupal\blocache\BlocacheViewBuilder::preRender', Array) (Line: 432)
    

    @nidhish can you please check it if you can reproduce the problem after installing content_redirect_to_front and blocache, too? To detect the source of the problem we need to reproduce it from clean install.

  • @kaszarobert I am still able to access the Content Redirect to Front Settings at admin/config/content/content_redirect_to_front_settings and also able to save the configurations, even after enabling the blocache v2.0.0 on my drupal 10.4 site. There could be some issue with a specific Drupal version or some other module. Kindly mention your drupal version, so I can try to replicate the issue.

  • πŸ‡ΊπŸ‡¦Ukraine godsman

    @nidhish When you install the module on a clean Drupal 10 site, this error does not occur. The issue arises on sites that have been upgraded from Drupal 7 to 10 or, as in my case, from Drupal 9 to 10. I will try your advice to uninstall and reinstall the module, and I will provide an update afterward.

  • πŸ‡ΈπŸ‡°Slovakia kaszarobert

    I managed to reproduce the issue on a non English Drupal 10 site. The cause of the problem was that there was no default config values provided during install and while this is not a problem on single language sites, when config_translation is enabled on multi language sites, then it throws this as Drupal loads FALSE instead of the config object.

    I put out a new release with a fix. Run the database updates or reinstall the module.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024