The way the menu structure for db_log is built there isn't a breadcrumb link back to the recent log entries page. This patch moves the events to /reports/db_log/event/%d. It effectively adds the recent log entries page to the breadcrumb trail.

CommentFileSizeAuthor
db_log-event-breadcrumbs.patch1.08 KBdopry

Comments

dopry’s picture

Version: 6.x-dev » 7.x-dev

bump.

dvessel’s picture

Status: Needs review » Needs work

Tested with 6, assuming it would work there too but it causes the "details" to omit the content.

vladimir.dolgopolov’s picture

The patch didn't work with D7 either.
Here is the test for Simpletest module:


class TestCase213075 extends DrupalTestCase {
  function get_info() {
    return array(
      'name' => t('[213075] BreadCrumb trail for event details does not contain recent log entries'),
      'desc' => t('The way the menu structure for db_log is built there isn\'t a breadcrumb link back to the recent log entries page. This patch moves the events to /reports/db_log/event/%d. It effectively adds the recent log entries page to the breadcrumb trail.'),
      'group' => t('Drupal 7 Tests'),
    );
  }
  
  // We open last watchdog entry and find out "Recent log entries" in BreadCrumb trail.
  function testIssue() {
    $web_user = $this->drupalCreateUserRolePerm(array(
      'access administration pages',
      'access site reports',
    ));
    $this->drupalLoginUser($web_user);
    $wid = db_result(db_query('SELECT MAX(wid) FROM {watchdog}'));
    $this->drupalGet('admin/reports/event/' . $wid);

    $breadcrumb_part = 'admin/reports/dblog';

    $content = $this->drupalGetContent();

    $this->assertWantedPattern('|<div class="breadcrumb">.*?(?<!\</div\>)' . $breadcrumb_part . '.*?(?<!\</div\>)</div>|', $content, 'Check "' . $breadcrumb_part . '"');
  }

}

c960657’s picture

Status: Needs work » Closed (duplicate)