Wednesday, 2 September 2015

How to fix Theme Developer module not showing caused by the conflict with JQuery

Symptom and the error message from JS console

The theme developer pop-up doesn't show up on the website.
When open Chrome Console, there is an error message saying that 'Uncaught Error: Syntax error, unrecognized expression:
'


Solution

Open the file with path of 'sites/all/modules/devel_themer/devel_themer.js'
Search the following snippet which is the source of the issue:
$(Drupal.settings.thmr_popup)
      .appendTo($('body'));
Use the snippet below to replace the above one:
$($.parseHTML(Drupal.settings.thmr_popup))
       .appendTo($('body'));
Note: The reason of this issue is that JQuery doesn't support putting html string in to the dollar function anymore.

No comments:

Post a Comment