Hi,

While using the quick_node_clone module in combination with the Thunder Admin theme, I saw that the advanced vertical tabs where not looking correctly.

Dove in the theme and found that this was causing the vertical tabs to look correctly:

/**
 * Checks if advanced vertical tabs should apply on this route.
 *
 * @return bool
 *   Should apply or not.
 */
function _thunder_admin_apply_advanced_vertical_tabs() {

  $route = Drupal::service('current_route_match');
  switch ($route->getRouteName()) {
    case 'entity.taxonomy_term.add_form':
    case 'node.add':
    case 'entity.node.content_translation_add':
      return TRUE;
  }

  if ($route->getRouteObject()->getDefault("_entity_form")) {
    return TRUE;
  }

  return FALSE;
}

Quickfix
Will provide a patch where the quick node clone route is added as a quickfix,

Long term fix
I think we have to make it possible that (non core) routes can be added by a hook or something else, therefor giving some more flexibility from external contrib routes.

CommentFileSizeAuthor
#2 tabs-node-clone-3067192-2.patch402 bytesFalco010
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Falco010 created an issue. See original summary.

Falco010’s picture

Falco010’s picture

Status: Active » Needs review

I think we should make a new feature request ticket for the long term solution.

volkerk’s picture

Title: Attach vertical tabs to node clone page » Add alter hook for enabling the sidebar tray

Add alter hook for enabling the sidebar tray:

  function hook_thunder_admin_enable_sidebar_tray_alter(&$result, $route) {
    $result = ($route->getRouteName() === '<some route>');
  }

See https://github.com/BurdaMagazinOrg/theme-thunder-admin/pull/246

  • volkerk authored 424c36d on 8.x-3.x
    Issue #3067192: Add alter hook for enabling the sidebar tray
    
    

  • volkerk authored eecebe7 on 8.x-2.x
    Issue #3067192: Add alter hook for enabling the sidebar tray
    
    

volkerk credited mtodor.

volkerk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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