- Issue created by @tstoeckler
- Status changed to Needs review
over 1 year ago 11:16pm 20 June 2023 - last update
over 1 year ago 30,077 pass, 102 fail - 🇩🇪Germany tstoeckler Essen, Germany
Here's a test only patch to prove the bug. I opted to simply installing Content Translation in the respective rest resource base classes instead of adding dedicated tests as there really is no translation-related functionality that we are testing here. It's simply about the fact that the resources work as before even with Content Translation enabled. But I guess this is arguable and could be changed, as well.
Didn't check why the language cache context is bubbled in the resources, but it doesn't seem problematic to me.
- last update
over 1 year ago 30,342 pass - 🇩🇪Germany tstoeckler Essen, Germany
And here's the fix. Stole the comment in the YAML file from the Views UI implementation in case anyone is wondering.
The last submitted patch, 2: 3368071-2.patch, failed testing. View results →
- Assigned to SenthilMohith
- Issue was unassigned.
- 🇺🇸United States smustgrave
@SenthilMohith thank you for the interest but shouldn't assign tickets to yourself unless a maintainer per https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett... →
queuing for 11.x tests.
- last update
over 1 year ago 29,507 pass - Status changed to RTBC
over 1 year ago 4:46pm 21 June 2023 - 🇺🇸United States smustgrave
Tests all green.
Also ran a test locally without the fix file and the testGet() failed with
Drupal\Component\Plugin\Exception\PluginNotFoundException : The "drupal:content-translation-overview" plugin does not exist. Valid plugin IDs for Drupal\Core\Http\LinkRelationTypeManager are: add-form, add-page, delete-form, delete-multiple-form, revision, revision-revert-form, revision-delete-form, create, enable, disable, edit-permissions-form, overview-form, reset-form, cancel-form, flush-form, duplicate-form, about, alternate, appendix, archives, author, blocked-by, bookmark, canonical, chapter, collection, contents, copyright, create-form, current, customize-form, derivedfrom, describedby, describes, disclosure, dns-prefetch, duplicate, edit, edit-form, edit-media, enclosure, first, glossary, help, hosts, hub, icon, index, item, last, latest-version, license, lrdd, memento, monitor, monitor-group, next, next-archive, nofollow, noreferrer, original, payment, pingback, preconnect, predecessor-version, prefetch, preload, prerender, prev, preview, previous, prev-archive, privacy-policy, profile, related, replies, search, section, self, set-default, service, start, stylesheet, subsection, successor-version, tag, terms-of-service, timegate, timemap, type, up, version-history, via, webmention, working-copy, working-copy-of, entity-permissions-form
Think this is good.
- last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,338 pass, 2 fail The last submitted patch, 3: 3368071-3.patch, failed testing. View results →
- last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - Status changed to Needs review
over 1 year ago 9:25am 16 August 2023 - 🇬🇧United Kingdom longwave UK
+++ b/core/modules/content_translation/content_translation.link_relation_types.yml @@ -0,0 +1,14 @@ +drupal:content-translation-overview: ... +drupal:content-translation-add: ... +drupal:content-translation-edit: ... +drupal:content-translation-delete:
Why are these prefixed with
drupal:
? No other Drupal-specific link relations have this prefix. - Status changed to Needs work
over 1 year ago 4:04pm 21 August 2023 - Status changed to Needs review
over 1 year ago 8:43am 22 August 2023 - 🇩🇪Germany tstoeckler Essen, Germany
First of all, not sure that's true.
canonical
,edit-form
, etc. are all standard IANA link relation types. The idea was to use thedrupal:
prefix for all custom ones. We may not have followed through on that correctly, not sure off the top of my head.But regardless, this is not establishing the content translation link relation types, they already exist and are being used. They are just missing their declaration. And Rest module happens to ve particularly strict about that.
So moving back to needs review as I'm not sure what else could be done here.
- 🇩🇪Germany tstoeckler Essen, Germany
Any response @longwave or @smustgrave? Per the above I don't think the criticism of the patch was warranted. I also took another look at the issue summary and I think the situation is explained sufficiently there, as well. Not going to re-RTBC myself because people are very sensitive with that, but maybe either of you can confirm and do so? Would be much appreciated.
- Status changed to RTBC
over 1 year ago 6:09pm 30 August 2023 - 🇺🇸United States smustgrave
Going to put in committer bucket to get more eyes on it.
Not sure I could make the call.
- last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - 🇳🇿New Zealand quietone
I'm triaging RTBC issues → . I read the IS and the comments.
Thanks for answering longwave's query. Due to the adding of the prefix, this should have subsystem maintainer review first (I checked with xjm)
- 🇬🇧United Kingdom longwave UK
Oh I see:
if (!$entity_type->hasLinkTemplate('drupal:content-translation-overview')) { $translations_path = $entity_type->getLinkTemplate('canonical') . '/translations'; $entity_type->setLinkTemplate('drupal:content-translation-overview', $translations_path); $entity_type->setLinkTemplate('drupal:content-translation-add', $translations_path . '/add/{source}/{target}'); $entity_type->setLinkTemplate('drupal:content-translation-edit', $translations_path . '/edit/{language}'); $entity_type->setLinkTemplate('drupal:content-translation-delete', $translations_path . '/delete/{language}'); }
So we already declare these link templates - this code has existed since 8.0. But we didn't define the metadata for them, which REST module requires. Changing these now would break backward compatibility with code that already uses them, which is out of scope of this issue.
47:24 44:50 Running- 🇩🇪Germany tstoeckler Essen, Germany
Re #16: Again, this is not adding a prefix. It's just formally declaring, i.e. in a sense documenting, something that is already used. Subsystem maintainer review never hurts, so I have no issue with adding that tag, but wanted to point that out.
Re #17: Exactly. I tried to explain this in the issue summary, but maybe I didn't do a super good job. But that is exactly the point.
- last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
over 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass 2:25 0:17 Running- last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,340 pass, 1 fail The last submitted patch, 3: 3368071-3.patch, failed testing. View results →
- last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - last update
about 1 year ago 30,342 pass - Status changed to Needs work
about 1 year ago 12:04am 11 November 2023 The Needs Review Queue Bot → tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to RTBC
5 months ago 8:40am 10 July 2024 - 🇩🇪Germany tstoeckler Essen, Germany
Yup, back to RTBC then. Just pushed the patch to an MR, so the RTBC from #14 still applies.
- Status changed to Fixed
5 months ago 1:50am 17 July 2024 - 🇬🇧United Kingdom catch
OK @tstoeckler's explanation means we don't need subsystem maintainer review, just a misunderstanding about the links already existing (which I also would have done probably).
Committed/pushed to 11.x and cherry-picked back through to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.