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.
Comment | File | Size | Author |
---|---|---|---|
#29 | 2045077-field-list-29.patch | 3.75 KB | vijaycs85 |
#29 | 2045077-diff-23-29.txt | 1017 bytes | vijaycs85 |
#23 | 2045077-field-list-23.patch | 2.75 KB | YesCT |
#23 | interdiff-19-23.txt | 2.55 KB | YesCT |
#20 | 2045077-field-list-19.patch | 3.29 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyThe 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.
Comment #2
Gábor HojtsyAlso it would need to be one more core issue to add that too.
Comment #3
Gábor HojtsyLet'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.
Comment #5
Gábor HojtsyThe 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.
Comment #6
vijaycs85Fixed field issue, if the path issue resolved, it should work now.
Comment #8
vijaycs85patch 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.
Comment #9
Gábor Hojtsy#6: 2045077-field-list-6.patch queued for re-testing.
Comment #11
Gábor Hojtsy#6: 2045077-field-list-6.patch queued for re-testing.
Comment #12
Gábor HojtsyYay, #2057227: Field instance needs uri() method different from the default is now in. Retesting :D
Comment #14
Gábor HojtsyOk, 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?
Comment #15
Gábor HojtsyHere 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.
Comment #17
Gábor HojtsyWups, some fixes were missing.
Comment #18
Gábor HojtsyComment #20
Gábor HojtsyTried 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?
Comment #21
Gábor HojtsyComment #23
YesCT CreditAttribution: YesCT commentedI 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?
Comment #25
YesCT CreditAttribution: YesCT commentedtried 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.
Comment #26
vijaycs85#6: 2045077-field-list-6.patch queued for re-testing.
Comment #27
Gábor Hojtsy@YesCT: I've opened #2068819: Problem with contact category translation routes for your contact bug. Just so its preserved.
Comment #28
Gábor Hojtsy#6: 2045077-field-list-6.patch queued for re-testing.
Comment #29
vijaycs85Thanks @Gábor Hojtsy for great help on IRC. Here is the updated field URL version which fixes the test issues.
Comment #30
Gábor HojtsyYay! Thanks for working this out with me :) Committed and pushed. Also removed the @todo as well since the real test passes now. Yay!