Drupal Core: 8.4.3
Updating to Module V: 8.x-1.1 from V: 8.x-1.0

Getting error: when try to clear cache & running update.php

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getPath() on null in Drupal\config_translation\ConfigNamesMapper->getOverviewRoute() (line 233 of core/modules/config_translation/src/ConfigNamesMapper.php).
Drupal\config_translation\ConfigNamesMapper->getOverviewRoute() (Line: 39)
Drupal\config_translation\Routing\RouteSubscriber->alterRoutes(Object) (Line: 37)
Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes(Object, 'routing.route_alter', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('routing.route_alter', Object) (Line: 184)
Drupal\Core\Routing\RouteBuilder->rebuild() (Line: 83)
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() (Line: 1157)
drupal_flush_all_caches() (Line: 350)
Drupal\system\Controller\DbUpdateController->selection(Object) (Line: 164)
Drupal\system\Controller\DbUpdateController->handle('selection', Object)
call_user_func_array(Array, Array) (Line: 110)
Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 73)
Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 28)

Comments

arunverma created an issue. See original summary.

gnuget’s picture

Status: Needs work » Postponed (maintainer needs more info)

Hi!

This error seems unrelated to this module. it comes from config_translation.

Can you provide more info please? like how replicate it?

Thanks.

misterkay’s picture

StatusFileSize
new6.01 KB

I am having a similar problem that I think is routed with whatever is causing this.

I have this module included in a build profile. With Drupal 8.4.3 and Config Perms 8.1 the installation fails with a recursive router rebuild error. I removed the module from the build profile and it installs fine.

I've attached part of the stack trace from the install failure. The lines not shown are all related to the install profile being launched via Drupal console. I get the same problem via the standard install process as well though.

gnuget’s picture

I think this is related with #2877329: When [content_translation, config_translate] module are enabled, And enabled [Custom Permissions], Then we will get Route "custom_perms_select_list_form" does not exist

I fixed this on the 8.x-2-x branch, but sadly that branch also works differently than the 8.x-1.x because it works with routes instead of paths.

I wonder if you would like to help me and test it (on a test environment, the module is not ready to be used on a real site yet), I will create the first alpha release this week.

misterkay’s picture

I'll poke around on 2.X, with respect to #2877329, I think it's deeper than just language/translate, because I don't have those modules installed and get a similar issue.

michael.acampora’s picture

StatusFileSize
new648 bytes

This is a "known" problem for contrib modules.

For an example see this issue: https://www.drupal.org/project/password_policy/issues/2703717

Reproduce:
Install config_perms module and then turn on the config_translation module.
Clear the cache you will get the the fatal error, that's also in the issue summary.

Solution:
The entity declares a route for edit-form, but this is not declared as a route in config_perms.routing.yml
Attached patch adds the route to config_perms.routing.yml

undersound3’s picture

I had config_translation enabled already and got this error during installation of this module. Returning back to e.g. admin/modules worked but indeed when trying to clear the cache i got the error again.

After I applied the patch from #6 I could successfully clear the cache etc.

Thanks for the patch mike.vindicate@gmail.com

geek-merlin’s picture

Title: Update.php & Cache clear does not work » Update.php & Cache leads to Exception
Version: 8.x-1.1 » 8.x-1.x-dev
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Raising prio as this makes the site unusable.
As @gnuget stated in #4, this is about a backport of a fix committed to 2.x in #2877329: When [content_translation, config_translate] module are enabled, And enabled [Custom Permissions], Then we will get Route "custom_perms_select_list_form" does not exist
> I fixed this on the 8.x-2-x branch, but sadly that branch also works differently than the 8.x-1.x because it works with routes instead of paths.

I can confirm this bug, same backtrace (line numbers changed a bit), and can confirm that patch #6 fixes the issue for me. So RTBC.

kristen pol’s picture

Assigned: Unassigned » kristen pol

I'm going to make a release soon so looking at all recently fixed issues along with RTBC and needs review.

kristen pol’s picture

Merging to 8.x-1.x shortly.

Note that @gnuget did not add this code to 8.x-2.x but instead used a different approach per #4.

  • kristen pol committed cc8ae65e on 8.x-1.x
    Issue #2929352 by mike.vindicate, misterkay, arunverma, gnuget, kristen...
kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks, everyone.

Status: Fixed » Closed (fixed)

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