Score:1

Views UI javascript is broken

cn flag

I discovered today that the Views UI is broken on one my sites. I'm not sure when it broke, because the Views UI is not one of the things I check after updates. I'm currently at 9.5.3.

My Views UI logs the error "Uncaught ReferenceError: assignment to undeclared variable loadjs", and follows up with a bunch of other errors that I assume stem from the first one.

When I disable JS aggregation the issue goes away.

This appears to be caused by loadjs getting packaged together with shepherd.js that turns on strict mode, and loadjs not declaring the loadjs variable (to save 4 bytes?).

So as far as options go, I'm thinking:

  • patching in "var " for loadjs
  • patching out strict mode for shepherd.js
  • disabling js aggregation for admin routes somehow

Am I missing something? How come I'm apparently the only one seeing this problem?

unusedspoon avatar
aq flag
Looks like you're not the only one https://www.drupal.org/project/drupal/issues/3336143
leymannx avatar
ne flag
I’m voting to close this question because it's a known issue on drupal.org.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.