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)
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2929352-add-edit-form-route.patch | 648 bytes | michael.acampora |
| #3 | recursive rebuild.txt | 6.01 KB | misterkay |
Comments
Comment #2
gnugetHi!
This error seems unrelated to this module. it comes from config_translation.
Can you provide more info please? like how replicate it?
Thanks.
Comment #3
misterkay commentedI 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.
Comment #4
gnugetI 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.
Comment #5
misterkay commentedI'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.
Comment #6
michael.acampora commentedThis 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
Comment #7
undersound3 commentedI 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
Comment #8
geek-merlinRaising 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.
Comment #9
kristen polI'm going to make a release soon so looking at all recently fixed issues along with RTBC and needs review.
Comment #10
kristen polMerging 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.
Comment #12
kristen polThanks, everyone.