Problem/Motivation

See related issue for the issue history. See the change notice: https://www.drupal.org/node/3440477

Steps to reproduce

1. Update to core 10.3
2. Use sticky for any table
3. Observe no sticky behavior.
4. Observe javascript console displays error "Uncaught TypeError: Drupal.TableHeader is undefined"

Proposed resolution

Unsure. Also unsure how to support D10.2 and below and also D10.3 and above.

See related issue for the issue history. See the change notice: https://www.drupal.org/node/3440477

Issue fork bootstrap-3459375

Command icon 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

DanChadwick created an issue. See original summary.

danchadwick’s picture

What a mess. This MR and patch update bootstrap to
a) set the updated class for stick tables (sticky-header),
b) remove the bootstrap custom javascript related to TableHeader, now removed in D10.3, and because of that,
c) require D10.3, dropping D9 support.

In order to make sticky headers work properly, I also had to
a) disable the responsive table option in the theme settings (incompatible with sticky headers) and
b) add custom CSS to set the sticky table's thead to an appropriate background color and change the z-index to 90 (500 is incompatible with other bootstrap z-indices).

jwag956’s picture

This patch worked for me .. Thanks!

It should be noted that since this causes an exception it stops further JS parsing - which when using aggregated JS means that many other JS libraries may not be loaded - so the effect may be far removed from tables.

danchadwick’s picture

Status: Active » Closed (duplicate)
Related issues: +#3428283: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x

Closed by #3428283, although Drupal 10.3 is needed, not 10.2.