Download & Extend

Watchdog live doesn't work without Clean URLs

Project:Watchdog Live
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

This can be fixed like so:

//Line 39 of watchdog.module
//Before:
drupal_add_js(array('watchdogLive' => array('basePath' => base_path())), 'setting');

//After:
drupal_add_js(array('watchdogLive' => array('basePath' => url('admin/logs/watchdog/live/callback'))), 'setting');

url() includes the base_path() and handles whether clean urls are enabled or not. Its also probably best to have the path code in PHP, not JS.

//Line 28 of watchdog_live.js
//Before:
$.get(Drupal.settings.watchdogLive.basePath +'admin/logs/watchdog/live/callback', function(data) {

//After:
$.get(Drupal.settings.watchdogLive.basePath, function(data) {

Tested in 5.7, with drupal in both a subfolder and not.

Comments

#1

Status:needs review» active

ya that looks cool.

can you submit a patch?