Drupal Version
10.x
Domain module version
2.x
Problem/Motivation
I have a site with content translation enabled. field_domain_access is configured as untranslatable. Each translations of entity should have the same assigned domains. The untranslatable fields are hidden (untranslatable_fields_hide) on the entity translation form. I have multiple editors with different domain assignments. It not possible to save the translations unless the editor has the same domain assignments as the content entity.
It occurs an entity validation error during entity save. Content Translations sets the domain fields to #access => FALSE in \Drupal\content_translation\ContentTranslationHandler::entityFormSharedElements. This happens after the domain_access_form_node_form_alter. I tried to change the order by converting it to a #process callback.
Expected Behavior
Domain Access field is hidden, existing values are kept as is.
Actual Behavior
Steps to reproduce
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3367186-4-reroll-beta2.patch | 7.53 KB | alexrayu |
| #8 | 3367186-4-reroll.patch | 7.66 KB | xavier.masson |
| #6 | 3367186-4.patch | 7.95 KB | webflo |
| #4 | 3367186-3.patch | 7.79 KB | webflo |
| #2 | 3367186-2-test-only.patch | 4.48 KB | webflo |
Issue fork domain-3367186
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
webflo commentedComment #3
webflo commentedComment #4
webflo commented#2 contains the test-only patch.
Comment #6
webflo commentedFixes fatal error on config entity forms.
Comment #7
agentrickardNice -- even a test update.
I would like to see a comment on `function domain_access_module_implements_alter()` that indicates what we are doing (and why),
Comment #8
xavier.massonRerolled the patch to apply cleanly against the latest codebase. No changes were made to the patch's logic or functionality.
Comment #9
alexrayu commentedHere is a rerolled patch from xavier.masson, applying to beta2.
Comment #10
mably commentedCould you create a MR please?
Comment #12
mably commentedLooks like an interesting feature to have for next release.
MR created on latest 2.0.x. Tests are all green.
Could someone give me a RTBC please?
Comment #13
mably commentedLooks like the MR needs some cleanup.
Comment #14
mably commentedNot sure to really understand what this MR is doing and why.
Some explanations are needed before merge.
Comment #15
mably commentedOk, finally got to understand every part of it. We should be ready for merge.
The
domain_access_module_implements_alterhook didn't solve the problem for me.Had to increase the
module_weightto make it work.Could we have some RTBC please?
Comment #17
mably commentedComment #20
emircan erkul commented@mably thank you for the update.
Can i learn why service naming change always? https://git.drupalcode.org/project/domain/-/blob/3.0.0-alpha4/domain_con... vs https://git.drupalcode.org/project/domain/-/blob/3.0.0-alpha3/domain_con...
Asking because I have one dependent module, need to switch again and again
Comment #21
mably commented@emircan-erkul thanks a lot for the catch!
This was a nasty tagging bug on the 2.0.x branch.
Problem fixed with 3.0.0-alpha5.
Comment #22
mably commentedIf needed, I'm available for discussion on the #domain channel of the Drupal.org Slack.
Comment #23
emircan erkul commentedThank you, appreciate it