Koumbit.org

For freedom and solidarity online

What to do when devel and devel themer aren't printing any messages in Google Chrome

I recently had a problem with both devel and devel themer: neither were printing any messages to the page. When I called dpm() my debugging messages didn't show up, and when I enabled the devel themer module the "Themer info" popup wasn't appearing on any page. This small but incredibly annoying problem drove me crazy, and I couldn't immediately find a solution mentioned in the issue queues or elsewhere online. But I eventually figured out it, and here's how to fix it!

I eventually determined that the problem was with syntax errors on my site, which I noticed while printing other debugging information to the console. I had two problems: a fatal error in a custom javascript file, and an empty site logo definition in my theme which resulted in Drupal printing the logo as . This broken tag caused an error in Chrome, as the server was returning a resource of type text/html and not an image, and the Javascript problem was caused by calling the JQuery Dialog method $('#popupDialog').dialog() on a page without

present. In both cases Chrome stopped trying to process elements of the page, breaking the display of debugging information.

Once I changed the theme setting to not print a logo, and wrapped the dialog setup function in if ($('#popupDialog').length){}, the console errors disappeared and the Javascript scripts which power devel and devel themer were able to run without any problems. Of course, if you have this problem you've probably made a different syntax error, but the take away message here is to check the console when Javascript on your page isn't running.

And with that, I'm going to go open documentation requests in the issue queue for both these modules now. Happy debugging!

Edit: a reader points out that kpr() will work better in the theme layer and possibly avoid this sort of problem. I would still advise dealing with any critial errors shown in the browser console, though.

Call us

☏ +1 514 907 9494
Lun: 10h à 12h et 13h à 16h
Mar: 10h à 12h
Mer: 10h à 12h et 13h à 16h
Jeu: 10h à 12h
Mon: 10am to 12pm and 1pm to 4pm
Tue: 10am to 12pm
Wed: 10am to 12pm and 1pm to 4pm
Thu: 10am to 12pm

Come and See Us!

1883, rue Atateken,
Montréal (Québec) H2L 3L7, Canada
Veuillez noter que nos bureaux n'ont pas de stationnement attitré.
1883 Atateken Street,
Montreal, Quebec, H2L 3L7, Canada
Please note that you'll need to find on-street parking.

Write to Us

Informations générales

Support technique

Pour une demande de devis, voir le formulaire à la page contact.

Nos clefs PGP

Politique de confidentialité

General inquiries

Technical support

For a free estimate, see the form on our contact page.

Our PGP keys

Privacy Policy

Follow Us

ktweb_menu_social

Mouton