@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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Ok, I could not reproduce this. @YesCT can you reproduce this now? Or someone else?

YesCT’s picture

FileSize
144.33 KB

Yep. git pulled core and config translation.

I can still reproduce, but with installing the minimal profile.

structure-error.png

Gábor Hojtsy’s picture

Status: Active » Needs review
Issue tags: +D8MI, +language-config
FileSize
3.27 KB

What 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.

Status: Needs review » Needs work

The last submitted patch, inject-entitymanager-check-type.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
2.25 KB

$mapper may not exist in this condition system anymore, so add it individually only if we know it exists.

Status: Needs review » Needs work

The last submitted patch, blocktype-change-menu-change-4.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
3.64 KB

Upload the right one :)

YesCT’s picture

Status: Needs review » Needs work

config_translation has to be enabled.
and turns out it happens in standard profile also.

patch does not help with error.

YesCT’s picture

config_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.

Gábor Hojtsy’s picture

The operations alter puts in the links in the .module file.

YesCT’s picture

hm.

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.

YesCT’s picture

simplytest.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

vijaycs85’s picture

is it still relevant? seems lots of things changed in ConfigMapperManager.

Schnitzel’s picture

so 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

Schnitzel’s picture

Status: Needs work » Closed (won't fix)

not sure if this is the right Status =)

Gábor Hojtsy’s picture

Status: Closed (won't fix) » Closed (duplicate)