Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you put ajax tab before preloaded tabs,
preloaded tabs won't work properly (tab content won't be shown).
To fix you have to change theme_tabpage function
(don't add div if tab is ajax loaded):
The correct function:
<?php
function theme_tabpage($element) {
$output = '';
// Ensure the tab has content before rendering it.
if (!empty($element['#content']) || !empty($element['#children'])) {
$output .= '<div id="' . $element['#tab_name'] . '" class="tabs-' . $element['#tabset_name'] . '">';
$output .= '<h2 class="drupal-tabs-title js-hide">'. $element['#title'] .'</h2>';
$output .= $element['#content'] . (!empty($element['#children']) ? $element['#children'] : '');
$output .='</div>';
}
return $output;
}
?>