Problem/Motivation
When a CM Document is saved, validation should prevent save if there is already a CM document for that entity or entity:field combination.
The system should never have two documentations for the same thing.
blocked by https://www.drupal.org/project/content_model_documentation/issues/3334959
Steps to reproduce
Proposed resolution
The approach should be similar to what is done in the allow_only_one module.
However that module can not be used directly because cm_document entity type is not supported by that module and there os no good reason to extend that module to use it.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork content_model_documentation-3339247
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
swirtComment #3
swirtComment #4
swirtThis is less critical now that https://www.drupal.org/project/content_model_documentation/issues/3346158 has been resolved.
Validation is still important, but not as critical.
Additional note: Validation will have to exempt applying to site.note, site.process and site.principle as these can have multiples of the same type creates as they are not entity specific.
Comment #5
swirtComment #6
swirtComment #9
jaydarnellI believe I have this one sorted @swirt
Comment #11
swirtThank you for this contribution @JayDarnell.
This will go out with 1.0.5
Comment #12
swirt