Validation fail after preview

Created on 15 February 2024, about 1 year ago

Problem/Motivation

On our project, we have a preview button for content. When we set the group(s) and "group" visibility option, pressed the preview button, and went back to editing I received the error "group visibility is not allowed". It is because of the disabled group option.

Steps to reproduce

- Enable preview for nodes
- On adding node set group with "group" visibility option
- Press the Preview button
- Go back to editing process

Proposed resolution

In the "social_group_field_widget_single_element_form_alter" instead of getting "groups" from form values use the user input, as form values do not always exist after the preview.

πŸ› Bug report
Status

Active

Version

12.1

Component

Code (back-end)

Created by

πŸ‡ΊπŸ‡¦Ukraine tbkot

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

Comments & Activities

  • Issue created by @tbkot
  • Status changed to Needs review about 1 year ago
  • πŸ‡©πŸ‡ͺGermany tasc Berlin

    We ran into the similar problem, but under different conditions:

    The content-type has an additional upload field.
    Whenever we set the (closed) group first and upload a document afterwards, the validation introduced in SocialNodeForm 80a5c4c triggers this error when trying to save (create) the node.

    This patch fixes the issue for us.

  • πŸ‡©πŸ‡ͺGermany tasc Berlin
Production build 0.71.5 2024