Problem/Motivation
When upgrading Drupal to v11, the BigPipe core module breaks SHS.
Steps to reproduce
js/shs.js looks for appModel class that is defined in js/AppModel.js file but that file in Drupal 11 with BigPipe enabled is loaded AFTER shs.js so shs.js throws an error and the widget is not shown
Proposed resolution
Make it compatible with BigPipe in Drupal 11
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork shs-3495590
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
joseph.olstadComment #4
catchhttps://git.drupalcode.org/project/shs/-/blob/2.0.x/shs.libraries.yml?re...
js/shs.js is defined with weight -1 which means that it would be loaded before all the other files in the library, removing the weight might be enough?
This is probably #3467860: Ensure consistent ordering when calculating library asset order (in 11.1 and 10.4) rather than bigpipe specifically.
Comment #5
joseph.olstadHmm, thanks @catch! :)
ok, so probably need to update the .info.yml for shs
like this ? ^
Comment #6
catchWell the question is, why is the weight -1 set?
If the module works without it (or can be made to work without it), then it should work across Drupal versions and not require increasing the requirements at all.
Normally, if a file depends on other files in the same library, you would put it further down in the list of files too - iirc we load files in the order they're listed, and not specify a weight.
Comment #9
joseph.olstadComment #10
joseph.olstadhttps://www.drupal.org/project/shs/releases/2.0.1
Comment #11
joseph.olstad