- Issue created by @stefan.korn
- Merge request !9Issue #3533870: Change the way Third Party Settings are set → (Open) created by stefan.korn
With 📌 Convert global configuration to vocabulary third party settings Fixed Third Party Settings were introduced for configuration. The way the Third Party Settings are saved is not ideal imho. The Third Party Settings are set in a submit handler on the taxonomy vocabulary form and the vocabulary is saved in the submit handler. This is probably not the proper way of doing this, as this is doing a preliminary save of the vocab entity, that is not expected and can interfere with other hooks or modules that have a say in saving a taxonomy vocabulary.
Though there is no extensive documentation for Third Party Settings on drupal.org as far as I have found, beside #2479551: Improve documentation for Third Party Settings → , there are good examples from others that document a proper way of saving third party settings, for example: https://www.hashbangcode.com/article/drupal-10-adding-third-party-settin...
By using "entity_builders" one can set the Third Party Settings and avoid to save the entity preliminary. Entity Builders are also not well documented at drupal.org, see 🐛 Document #entity_builders EntityForm callbacks Active , but there are usage examples of Entity Builders in core and contrib that outline how it is done and used.
use Entity Builder to save the Third Party settings for the module.
will provide an MR on this
Active
2.0
Code