Uncaught javascript errors in Drupal 8 menu toolbar when viewing anonymously
This is a regression, causing javascript problems on public pages, originating with commit b30809e4. This is the error I observed on a public contribution page that I'm currently setting up:
Uncaught TypeError: Cannot read property 'left' of undefined at adjustToggle (crm.drupal8.js:10)
That line of code is looking for $('#toolbar-item-civicrm')
, which doesn't exist, since it is a public accessible page with no menu.
Since this stops javascript execution, one symptom is that the payment methods selector for loading different payment processor fieldsets doesn't work.
We're on Drupal 8.7.1 and CiviCRM 5.13.4.
To reproduce:
- drupal 8 based install, make a public contribution page
- reduce the window width to less than 768 pixels
- log out and load contribution page