Steps to reproduce:

  1. Install Drupal with the standard profile
  2. Enable the Content Translation module
  3. Enable comment translation for the Article bundle
  4. Create a new article
  5. Post a comment
  6. Access the comment translation overview through the "translate" link

Expected result: the translation overview page is shown.
Actual result: the following exception is thrown:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "comment_permalink" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 127 of /var/www/test.dd/core/lib/Drupal/Core/Routing/RouteProvider.php).

The exception is thrown while rendering comment local tasks/actions.

Related

Files: 
CommentFileSizeAuthor
#27 content_translation-2106349-27.patch13.92 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 58,485 pass(es).
[ View ]
#27 interdiff.txt1.8 KBdawehner
#21 content_translation-2106349-21.interdiff.txt869 bytesplach
#21 content_translation-2106349-21.patch13.67 KBplach
PASSED: [[SimpleTest]]: [MySQL] 58,454 pass(es).
[ View ]
#15 content_translation-2106349-15.interdiff.txt677 bytesplach
#15 content_translation-2106349-15.patch13.68 KBplach
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch content_translation-2106349-15.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#13 content_translation-2106349-13.patch13.02 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 58,830 pass(es), 3 fail(s), and 0 exception(s).
[ View ]
#13 interdiff.txt2.93 KBdawehner
#11 ct-comment_local_tasks-2106349-11.interdiff.txt908 bytesplach
#9 content_translation-2106349-9.patch10.2 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 58,466 pass(es), 327 fail(s), and 43 exception(s).
[ View ]
#9 interdiff.txt5.68 KBdawehner
#7 ct-comment_local_tasks-2106349-7.patch4.52 KBplach
FAILED: [[SimpleTest]]: [MySQL] 58,879 pass(es), 9 fail(s), and 0 exception(s).
[ View ]
#7 ct-comment_local_tasks-2106349-7.test.patch1.44 KBplach
FAILED: [[SimpleTest]]: [MySQL] 58,816 pass(es), 11 fail(s), and 0 exception(s).
[ View ]
#5 comment-routing-tabs.patch3.08 KBGábor Hojtsy
PASSED: [[SimpleTest]]: [MySQL] 58,400 pass(es).
[ View ]
#3 comment-routing-tabs.patch3.16 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-routing-tabs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Issue summary:View changes

Updated issue summary.

Issue summary:View changes

Updated issue summary.

Try comment.permalink instead of comment_permalink. Same for the others in that file.

Already tried that and I get a new exception:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("comment") to generate a URL for route "/comment/{comment}". in Symfony\Component\Routing\Generator\UrlGenerator->doGenerate() (line 155 of /var/www/test.dd/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php).

Not sure how I am supposed to proceed :(

Test coverage for this can be provided by simply reverting the change introduced in #2004626-87: Make non-configurable field translation settings available in the content language settings.

Status:Active» Needs review
StatusFileSize
new3.16 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-routing-tabs.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

All local tasks in comment.local_tasks.yml need to use the comment DOT notation, not underscores. I noted this in an unrelated issue and the fix got removed in that patch, since it still worked kind of with comment_menu() having those tabs also. This would be the cleanup for comment stuff AFAIS.

Status:Needs review» Needs work

The last submitted patch, comment-routing-tabs.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new3.08 KB
PASSED: [[SimpleTest]]: [MySQL] 58,400 pass(es).
[ View ]

Rerolled for current head, less changes needed in local_tasks.yml, since the task names now use dots. The route names don't, so the tabs basically refer to nonexistent routes.

Status:Needs review» Needs work

Later I will move here the tests added in #2004626: Make non-configurable field translation settings available in the content language settings. Those should provide us the test coverage we are currently missing.

StatusFileSize
new1.44 KB
FAILED: [[SimpleTest]]: [MySQL] 58,816 pass(es), 11 fail(s), and 0 exception(s).
[ View ]
new4.52 KB
FAILED: [[SimpleTest]]: [MySQL] 58,879 pass(es), 9 fail(s), and 0 exception(s).
[ View ]

Still failing with:

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("comment") to generate a URL for route "/comment/{comment}". in Symfony\Component\Routing\Generator\UrlGenerator->doGenerate() (line 155 of /var/www/test.dd/core/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php).

It seems there's an inconsistency between the expected variable name (comment) and the actual variable name (entity).

Status:Needs work» Needs review

Issue summary:View changes

Updated issue summary.

StatusFileSize
new5.68 KB
new10.2 KB
FAILED: [[SimpleTest]]: [MySQL] 58,466 pass(es), 327 fail(s), and 43 exception(s).
[ View ]

This is my idea to fix it.

Status:Needs review» Needs work

The last submitted patch, content_translation-2106349-9.patch, failed testing.

This is needed to fix some unintended failures in #7. It should be incorporated in the next patch.

Priority:Major» Critical

Status:Needs work» Needs review
StatusFileSize
new2.93 KB
new13.02 KB
FAILED: [[SimpleTest]]: [MySQL] 58,830 pass(es), 3 fail(s), and 0 exception(s).
[ View ]

This fixes nearly all of the tests.

Could it be that the entity_test_mul should have a label entity key in order to be translatable?

Status:Needs review» Needs work

The last submitted patch, content_translation-2106349-13.patch, failed testing.

Priority:Critical» Major
Status:Needs work» Needs review
StatusFileSize
new13.68 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch content_translation-2106349-15.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
new677 bytes

Of course :)

Priority:Major» Critical

d.o.--

+++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationUITest.php
@@ -99,6 +100,22 @@ protected function assertBasicTranslation() {
+      if ($entity->hasTranslation($langcode)) {
+        debug($entity->getTranslation($langcode)->label());
+        $this->assertText($entity->getTranslation($langcode)->label(), format_string('Label correctly shown for %language translation', array('%language' => $langcode)));

debug() is still in there...

Status:Needs review» Needs work

The last submitted patch, content_translation-2106349-15.patch, failed testing.

Status:Needs work» Needs review

#15: content_translation-2106349-15.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, content_translation-2106349-15.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new13.67 KB
PASSED: [[SimpleTest]]: [MySQL] 58,454 pass(es).
[ View ]
new869 bytes

Rerolled and removed the debug leftover.

#2102125-19: Big Local Task Conversion related to the dot underscore naming for local tasks.

Issue summary:View changes

Updated issue summary.

Issue tags:+WSCCI

The interdiff in #2106349-15: Comment translation overview has broken local tasks looks just perfect. I would love to RTBC that.

Status:Needs review» Reviewed & tested by the community
Issue tags:-WSCCI

I read the patch.
titles and labels are matching, uses correct naming convention, removes local tasks from hook_menu that are in comment.local_tasks.yml or already in comment.routing.yml
weight of delete is different. trying manually: both before and after, delete is first in the list of links: " delete edit reply approve"
also, I dont see /view in the patched version. I'll try it manually. Both before and after the patch comment/1/view gives page not found, so ok.

this looks ok to me. rtbc.

Issue tags:+WSCCI

replacing tag lost in cross post.

Issue summary:View changes

Updated issue summary.

Status:Reviewed & tested by the community» Needs work
  1. +++ b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationOverviewAccess.php
    @@ -45,7 +45,8 @@ public function appliesTo() {
    -    if ($entity = $request->attributes->get('entity')) {
    +    $entity_type = $request->attributes->get('_entity_type');
    +    if ($entity = $request->attributes->get($entity_type)) {
           // Get entity base info.
           $entity_type = $entity->entityType();
           $bundle = $entity->bundle();

    Why do we get $entity_type from the request, then later get it again from $entity?

Status:Needs work» Needs review
StatusFileSize
new1.8 KB
new13.92 KB
PASSED: [[SimpleTest]]: [MySQL] 58,485 pass(es).
[ View ]

Why do we get $entity_type from the request, then later get it again from $entity?

There is no reason at all.

Removed the double usage of $entity_type.

Status:Needs review» Reviewed & tested by the community

Changes look sensible to me: RTBC again if the testbot agrees.

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

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

Issue summary:View changes

Updated issue summary.