Domain Access fields do not move to advanced node settings if only one is used

Created on 8 March 2021, over 3 years ago
Updated 14 September 2023, 10 months ago

Problem/Motivation

When creating/editing a node, I'd like to only show the Domain Access field in the advanced node settings, not the "Send to all affiliates" field. However, in this case neither shows.

This is because the code which moves the fields into the advanced node settings checks for the presence of _both_ fields, not just either one.

Steps to reproduce

Enable Domain Content. At /admin/config/domain/domain_access check Move Domain Access fields to advanced node settings. Go to Manage form display on a content type, and enable both Domain Access and "Send to all affiliates" fields. Verify that when creating/editing a node of that content type, both fields show up in the advanced node settings.

Then go back to Manage form display and disable the "Send to all affiliates". Go back to the node add/edit form; neither field is visible now, but it's expected to see the Domain Access field.

Proposed resolution

Change the if statement in domain_access_form_node_form_alter() to check separately for the presence of each field.

Patch to follow.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

- Domain Content

Created by

πŸ‡ΏπŸ‡¦South Africa burningdog

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024