Needs work
Project:
Drupal core
Version:
main
Component:
rest.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
28 Dec 2017 at 19:22 UTC
Updated:
30 Jan 2023 at 20:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
effulgentsia commentedComment #3
effulgentsia commentedSome background: #2183231-260: Make ContentEntityDatabaseStorage generate static database schemas for content entities is what added this special-casing of langcode to begin with. #2183231-264: Make ContentEntityDatabaseStorage generate static database schemas for content entities explains why that was done. I don't know if there ever was a followup since then to fix the underlying problem referenced in that comment. If so, that would be one possible explanation for why this code isn't needed anymore.
Additionally, at the time of the above,
isEmpty()was being checked below this code to switch on whether to check field access for'delete'or'update'. #2418119-48: REST user updates bypass tightened user account change validation, however, changed that to just'edit'in either case. I don't know if that change would have also potentially made this code no longer needed.Comment #4
wim leersComment #5
wim leers#2824851 landed. As #2824851-205: EntityResource::patch() makes an incorrect assumption about entity keys, hence results in incorrect behavior discovered that #2183231: Make ContentEntityDatabaseStorage generate static database schemas for content entities added these lines of code, and #2143729: Entity definitions miss a language entity key refined it further.
But #2930968: PATCHing entities with langcode = [] results in fatal error is indicating it doesn't work anyway.
Since Berdir has been active in all of these issues, I think he's probably best able to review this … assigning to him.
Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.