Project:Outline
Version:5.x-1.0
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review

Issue Summary

There's problem with listing all the outlines.

The following should fix the problem (line 1030 to 1034) function outline_list():

  foreach ($outlines as $volume_id => $title) {
  $result = db_query("SELECT nid FROM {outline_nodes} WHERE volume_id='%s' AND parent=%d LIMIT 0,1",$volume_id,0);
  $row = db_fetch_object($result);
    $items[] = l($title, 'node/'. $row->nid);
  }

hope this helps.

Comments

#1

Status:active» needs review

#2

What url path page does this fix an error on?

#3

This fixes the listing of outlines located at admin/content/outline. However, I'm not really sure this is the approach that should be taken, you are talking about hitting the database once per outline just to grab the nid of the parent node. Someone that has 300 outlines will have their database queried 300 times just to list this page...

This patch takes a different approach by creating a new function _list_outline_parents to be used instead of _list_outline (which returns only the volume id and title NOT the node id).

AttachmentSize
outline_patch_192875.patch 1.38 KB
nobody click here