Closed (fixed)
Project:
OpenCulturas
Version:
2.1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2024 at 15:58 UTC
Updated:
7 Feb 2024 at 12:16 UTC
Jump to comment: Most recent
Our custom theme is based on OpenCulturas Base. However, we chose to implement the menu toggle (burger) with different markup, by overriding page.html.twig.
Now we run into this JS error:
Uncaught TypeError: burgerButtonOpen is null
menuDialogCleanup [host]/profiles/contrib/openculturas-distribution/profile/themes/openculturas_base/js/openculturas-base.js?s7emi6:198
The error is caused by the fact that function menuDialogCleanup tries to update elements that might not exist, in our case the open (#button-offcanvas-open) and close (#button-offcanvas-close) buttons.
It should return early when any of the necessary variables does not exist.
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
mrshowermanComment #7
tobiasbThx. Commited and cherry-picked to 2.0.x.
Comment #9
mrshowerman