Problem/Motivation

After a node is saved with a published term, if the term is unpublished, the node form will have the value removed. This can result in data loss since saving the node form will remove the saved value without user interaction. Taxonomy terms might be used for purposes that don't necessarily require them to be published, or perhaps a user wants to unpublish a term for a period of time.

Steps to reproduce

  1. Configure CSHS as normal
  2. Create a published term
  3. Save a node, referencing that term on the CSHS field
  4. Unpublish the term
  5. View the node edit form and observe the CSHS field is empty

Proposed resolution

Add a configurable option to allow unpublished terms choices.

Remaining tasks

User interface changes

A new checkbox on the field widget settings.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#2 cshs-unpublished_terms-3559919.patch2.92 KBpookmish

Issue fork cshs-3559919

Command icon 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

pookmish created an issue. See original summary.

pookmish’s picture

StatusFileSize
new2.92 KB

joseph.olstad made their first commit to this issue’s fork.

joseph.olstad’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joseph.olstad’s picture

joseph.olstad’s picture

liam morland’s picture

This adds the $allow_unpublished param to CshsOptionsFromHelper::getOptions() but does not document the new param.

  • joseph.olstad committed 93e32148 on 4.0.x
    fix: #3559919 Remove unneeded use statement.
    By: joseph.olstad
    By: liam...

liam morland’s picture

Status: Fixed » Needs review

This merge request adds missing documentation.

  • liam morland committed cee7bff3 on 4.0.x
    fix: #3559919 Document new param to CshsOptionsFromHelper::getOptions...
joseph.olstad’s picture

Merged, thanks @liam morland

joseph.olstad’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joseph.olstad’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.