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
- Configure CSHS as normal
- Create a published term
- Save a node, referencing that term on the CSHS field
- Unpublish the term
- 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | cshs-unpublished_terms-3559919.patch | 2.92 KB | pookmish |
Issue fork cshs-3559919
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
pookmish commentedComment #6
joseph.olstadComment #8
joseph.olstadhttps://www.drupal.org/project/cshs/releases/4.0.4
Comment #9
joseph.olstadhttps://www.drupal.org/project/cshs/releases/4.0.4
Comment #10
liam morlandThis adds the
$allow_unpublishedparam toCshsOptionsFromHelper::getOptions()but does not document the new param.Comment #13
liam morlandThis merge request adds missing documentation.
Comment #15
joseph.olstadMerged, thanks @liam morland
Comment #16
joseph.olstadComment #18
joseph.olstadhttps://www.drupal.org/project/cshs/releases/4.0.5