Vertical tabs result in jQuery error when overlay-context hashtag is added to URL

Created on 24 May 2023, over 1 year ago
Updated 13 November 2023, about 1 year ago

Problem/Motivation

When you are using on site jQuery update (version 1.12 or higher) together with turned on core overlay module, on the page where are used also vertical tabs (for example node add/edit form) you will get javascript error: Synntax error, unrecognized expression: #overlay-context=....
which may result in various JS problems. For example CKEditor will not be loaded.

Problem is that in vertical-tabs.js when window.location.hash exists, we directly try to put it in the jQuery selector to find out if such element on site exists. You will get jQuery error as in has may be characters which jQuery does not expect.

Steps to reproduce

See attached screenshot.

Proposed resolution

We should remove from window.location.hash all characters which jQuery does not expect.

🐛 Bug report
Status

Fixed

Version

7.0 ⚰️

Component
Javascript 

Last updated 3 days ago

Created by

🇸🇰Slovakia durifal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024