Fix duplicated revision tab on entities #773

This commit is contained in:
Michael Stenta 2024-01-16 14:03:02 -05:00
parent 8091b51561
commit 31c5280662
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- [Patch drupal/core to fix Issue #3414883: datetime_timestamp widget does not use default field value #771](https://github.com/farmOS/farmOS/pull/771)
- [Fix duplicated revision tab on entities #773](https://github.com/farmOS/farmOS/pull/773)
## [3.0.0] 2024-01-05

View File

@ -79,6 +79,12 @@ function farm_ui_menu_entity_type_build(array &$entity_types) {
*/
function farm_ui_menu_local_tasks_alter(&$local_tasks) {
// Disable Drupal core revisions local tasks.
$target_entity_types = ['asset', 'data_stream', 'log', 'plan', 'taxonomy_term'];
foreach ($target_entity_types as $entity_type) {
unset($local_tasks['entity.version_history:' . $entity_type . '.version_history']);
}
// Remove local tasks provided by core taxonomy module.
$taxonomy_term_tasks = [
'entity.taxonomy_term.canonical',