This is at least dependent on #2045043: Field listings operations cannot be altered but then also the field instance does not have a URL properly. If the field instance knows which entity it belongs to, maybe we can have a url() method on it that would return an entity specific URL which would make this wired up?

Also needs tests. This is a clear blocker for core inclusion IMHO because it will uncover API changes needed once we have the field translatability in place.

Files: 
CommentFileSizeAuthor
#29 2045077-field-list-29.patch3.75 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 471 pass(es).
[ View ]
#29 2045077-diff-23-29.txt1017 bytesvijaycs85
#23 2045077-field-list-23.patch2.75 KBYesCT
FAILED: [[SimpleTest]]: [MySQL] 456 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#23 interdiff-19-23.txt2.55 KBYesCT
#20 2045077-field-list-19.patch3.29 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 468 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#17 2045077-field-list-17.patch2.61 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 470 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#15 2045077-field-list-15.patch2.61 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 470 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#6 2045077-field-list-6.patch2.62 KBvijaycs85
FAILED: [[SimpleTest]]: [MySQL] 474 pass(es), 1 fail(s), and 1 exception(s).
[ View ]
#6 2045077-diff-3-6.txt1.09 KBvijaycs85
#3 field-list-tests.patch2.35 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 307 pass(es), 2 fail(s), and 1 exception(s).
[ View ]

Comments

The field instance url() method would be similar to #2044825: Language entity missing uri() method implementation but it needs to take the parent entity into account.

Also it would need to be one more core issue to add that too.

Status:Active» Needs review
StatusFileSize
new2.35 KB
FAILED: [[SimpleTest]]: [MySQL] 307 pass(es), 2 fail(s), and 1 exception(s).
[ View ]

Let's start with a test. Now we can at least see the translate operations (but the links are not right). We still need the URL method on field instances solved.

Status:Needs review» Needs work

The last submitted patch, field-list-tests.patch, failed testing.

The fields URI problem already has an issue in #2057227: Field instance needs uri() method different from the default. That should be fixed for this to fully be possible, but we need the test here fixed as well :) The custom block module is not enabled.

Status:Needs work» Needs review
StatusFileSize
new1.09 KB
new2.62 KB
FAILED: [[SimpleTest]]: [MySQL] 474 pass(es), 1 fail(s), and 1 exception(s).
[ View ]

Fixed field issue, if the path issue resolved, it should work now.

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-6.patch, failed testing.

Status:Needs work» Postponed

patch in #6 failing because of #2057227: Field instance needs uri() method different from the default after applying the patch there, tests passing locally. So postponing this issue until we get #2057227: Field instance needs uri() method different from the default in.

Status:Postponed» Needs review
Issue tags:-Needs tests, -D8MI, -language-config

#6: 2045077-field-list-6.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-6.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+Needs tests, +D8MI, +language-config

#6: 2045077-field-list-6.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-6.patch, failed testing.

Ok, now we only have our own fails! Article node type undefined. Makes sense for a test :) We should create it. @vijaycs85 are you on this?

Status:Needs work» Needs review
StatusFileSize
new2.61 KB
FAILED: [[SimpleTest]]: [MySQL] 470 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Here is an updated version. Article is not a content type created by default but if we create a content type, the body field is added. So adding the body field on article was the wrong solution. We should add a custom content type, like other tests do and it will get a body field.

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-15.patch, failed testing.

StatusFileSize
new2.61 KB
FAILED: [[SimpleTest]]: [MySQL] 470 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Wups, some fixes were missing.

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-17.patch, failed testing.

StatusFileSize
new3.29 KB
FAILED: [[SimpleTest]]: [MySQL] 468 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Tried to debug why the page router does not get registered. I *thought* it is due to hook_menu, that will not get regenerated when a new content type is added (since we include entity based field URLs static in the list for hook_menu). However converting this to hook_menu_alter() did not seem to solve it :/ Any better ideas? This is the only fail now :) @vijaycs85?

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-19.patch, failed testing.

Assigned:Unassigned» YesCT
Status:Needs work» Needs review
StatusFileSize
new2.55 KB
new2.75 KB
FAILED: [[SimpleTest]]: [MySQL] 456 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

I was reading this through. Just some style stuff while I think about it. Also, reverted the change to the alter hook, since it didn't seem to make a difference. Is there another reason to make it be an alter?

in #17 it said some fixes missing... but the patch is the same. Was a file not added to the patch?

Status:Needs review» Needs work

The last submitted patch, 2045077-field-list-23.patch, failed testing.

Status:Needs work» Needs review

tried this manually, and the translate link works for body field on article.

installed in minimal.
------
and found this unrelated error. noting it here to look into later:
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).

-----

when installed a minimal profile, and manual create a content type, I dont get body created automatically.
why does it appear to be created in the test?

maybe I need to enable the fields module
yep. had to enable field ui.

now I have a manages fields operation and a body.
...and it is fine manually going to the translate link on the body.

Hm..

Will look at this more later.

#6: 2045077-field-list-6.patch queued for re-testing.

@YesCT: I've opened #2068819: Problem with contact category translation routes for your contact bug. Just so its preserved.

#6: 2045077-field-list-6.patch queued for re-testing.

StatusFileSize
new1017 bytes
new3.75 KB
PASSED: [[SimpleTest]]: [MySQL] 471 pass(es).
[ View ]

Thanks @Gábor Hojtsy for great help on IRC. Here is the updated field URL version which fixes the test issues.

Status:Needs review» Fixed

Yay! Thanks for working this out with me :) Committed and pushed. Also removed the @todo as well since the real test passes now. Yay!

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