https://git.drupalcode.org/project/bootstrap_storybook/-/blob/3.1.x/src/...
it will miss the node-type class when in preview mode.
can do this:
if (($node = \Drupal::routeMatch()->getParameter('node')) || ($node = \Drupal::routeMatch()->getParameter('node_preview'))) {
if ($node instanceof NodeInterface) {
// Add node ID body class.
$variables['attributes']['class'][] = 'node-' . $node->id();
// Add content type machine name body class.
$variables['attributes']['class'][] = 'node-type--' . str_replace('_', '-', $node->bundle());
}
}
This is only fix for this class in body tag, not sure somewhere still need do the same thing. I used this toppest class and be able to find this issue.
Not sure how fork works in drupal gitlab, looks like not really convenice.
Issue fork bootstrap_storybook-3193420
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 #3
doxigo commentedComment #5
doxigo commentedAlso another good catch, thanks