Wenn downloading the latest dev release and enabling it with drush en context on a multilingual site, I'll get the following error message:
Error: Call to a member function getPath() on null in /var/www/lakedrops/web/core/modules/config_translation/src/ConfigNamesMapper.php on line 233
This error gets thrown all the time, even if just flushing cache with drush. As soon as I disable the module again the error disappears. I wasn't able to look into that yet but would hope that someone may have an idea what could be causing this.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | context-Resolve_multilingual_exception-2802253-6.patch | 1.04 KB | replicaobscura |
Comments
Comment #2
rutiolmaSame problem here.
Comment #3
znak commentedComment #4
replicaobscuraSame error here.
I wonder if the issue is that Context's routes are all defined in the context_ui submodule, but config_translation is likely trying to determine one or more of the routes.
Just a hunch based on a similar issue I've seen before--I'm investigating this a bit more now.
Comment #5
replicaobscuraIn ConfigNamesMapper.php, the getBaseRouteName() method should be getting the base route name for the entity type, and I believe it's unable to without any routes being defined in the base module (unless you have context_ui enabled, but if it's a required module than having it be separate doesn't really make sense, so perhaps moving some of the routes up to the parent module is needed).
Comment #6
replicaobscuraHere's a patch that seems to fix the issue for me by moving only the
entity.context.edit_formroute up to the main context module instead of leaving it in context_ui.Is this the right way to go? If so, should any other routes be promoted to the parent module?
Comment #7
replicaobscuraNote that this issue also exists on alpha1, and this patch does seem to resolve the issue on alpha1 as well, if anyone's running into this but worried about updating to a dev version.
Comment #8
utement commentedPatch produces warning:
warning: 1 line adds whitespace errors.
but it does apply correctly. Patcs solves issue.
Ready for commit.
Comment #9
dietr_ch commented+1, patch works.
Comment #11
boshtian commentedComment #12
boshtian commented