@YesCT reported this at #2045077-25: Field translatability not wired up on the UI I did not attempt to reproduce, just reposting as separate issue:
on:
/admin/structure
Notice: Undefined offset: 4 in _menu_translate() (line 766 of core/includes/menu.inc).
Symfony\Component\Routing\Exception\ResourceNotFoundException: The route for '/admin/structure/contact/manage//translate' could not be found in Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest() (line 103 of /Users/ctheys/foo/d8/core/lib/Drupal/Core/Routing/RouteProvider.php).
Comment | File | Size | Author |
---|---|---|---|
#7 | inject-entitymanager-check-type-5.patch | 3.64 KB | Gábor Hojtsy |
#5 | blocktype-change-menu-change-4.patch | 2.25 KB | Gábor Hojtsy |
#3 | inject-entitymanager-check-type.patch | 3.27 KB | Gábor Hojtsy |
#2 | structure-error.png | 144.33 KB | YesCT |
Comments
Comment #1
Gábor HojtsyOk, I could not reproduce this. @YesCT can you reproduce this now? Or someone else?
Comment #2
YesCT CreditAttribution: YesCT commentedYep. git pulled core and config translation.
I can still reproduce, but with installing the minimal profile.
Comment #3
Gábor HojtsyWhat are the steps to reproduce? Use minimal profile, go enable contact module, surprise? Or don't even need to enable contact module? Looks like from that error, that the contact entity URLs are generated even though the contact entity does not exist on the system. IMHO we can do two things about this:
- once this is a core module, we can move the mapper definitions to the modules themselves, so no contact mapper is created unless contact module is enabled
- until this is a core module, we can add a check to the route subscriber and check if the entity type exists, and ignore it if it does not exist; this may be a good error handling mechanism anyway
Here is an *untested* patch to inject the entity manager to the plugin discovery service and check the existence of the entity type before registering it as a mapper. This should solve the problem IMHO.
Comment #5
Gábor Hojtsy$mapper may not exist in this condition system anymore, so add it individually only if we know it exists.
Comment #7
Gábor HojtsyUpload the right one :)
Comment #8
YesCT CreditAttribution: YesCT commentedconfig_translation has to be enabled.
and turns out it happens in standard profile also.
patch does not help with error.
Comment #9
YesCT CreditAttribution: YesCT commentedconfig_translation.config_translation.yml
13:contact_category:
15: base_path: 'admin/structure/contact/manage/{contact_category}'
lib/Drupal/config_translation/Tests/ConfigTranslationListUITest.php
223: $translate_link = 'admin/structure/contact/manage/' . $contact_form->id() . '/translate';
error says: The route for '/admin/structure/contact/manage//translate
looks like it is missing the id, the contact_category
I'm wondering where that is set, besides the yml. Maybe with an alter.
Comment #10
Gábor HojtsyThe operations alter puts in the links in the .module file.
Comment #11
YesCT CreditAttribution: YesCT commentedhm.
I can get other errors on that same page.
/admin/structure/custom-blocks/manage//translate
(standard profile)
Notice: Undefined offset: 4 in _menu_translate() (line 767 of core/includes/menu.inc).
Symfony\Component\Routing\Exception\ResourceNotFoundException: The route for '/admin/structure/custom-blocks/manage//translate' could not be found in Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest() (line 103 of /Users/ctheys/foo/drupal/core/lib/Drupal/Core/Routing/RouteProvider.php).
/admin/structure/menu/manage//translate
(minimal)
Notice: Undefined offset: 4 in _menu_translate() (line 767 of core/includes/menu.inc).
Symfony\Component\Routing\Exception\ResourceNotFoundException: The route for '/admin/structure/menu/manage//translate' could not be found in Drupal\Core\Routing\RouteProvider->getRouteCollectionForRequest() (line 103 of /Users/ctheys/foo/d8/core/lib/Drupal/Core/Routing/RouteProvider.php).
in this one, page not found for:
http://localhost/d8/admin/structure/menu/manage/footer
http://localhost/d8/admin/structure/menu/manage/admin
same for tools, etc.
Comment #12
YesCT CreditAttribution: YesCT commentedsimplytest.me does not have this problem, either.
I'm on Mac, with mysql and php 5.3.14, but the same with 5.4.4
Comment #13
vijaycs85is it still relevant? seems lots of things changed in ConfigMapperManager.
Comment #14
Schnitzel CreditAttribution: Schnitzel commentedso this will be fixed when #2083615: Use links annotation for config entity URI like for content entities is in, tested with plain D8, config_translation and minimal install profile
Comment #15
Schnitzel CreditAttribution: Schnitzel commentednot sure if this is the right Status =)
Comment #16
Gábor Hojtsy