I'm using indexpage to index a wiki-like system of terms. These terms are editable and revision history is tracked. That said, each time a node is edited, it appears an additional time in the indexpage table. For example, I just created an entry for 'Darren McGavin'. I edited it a few times to add some style. It now appears in the indexpage list 4 times. Each links to the exact same node.

I'm using Drupal 4.7.0-beta4.

I do not know the cause of the problem. If you need more detail, I can hopefully provide it.

Comments

coplan’s picture

Has anyone been able to duplicate this problem?

For reference, I include the following link(s) from my own site. Note that each one of the duplicate links points to the exact same place as its counterparts:

http://www.antisoc.net/indexpage/term/16

(Note, I am now using drupal 4.7.0-beta6 with the latest stable indexpage module)

Steve Dondley’s picture

I am not able to reproduce this with version 4.7. I'm using indexpage to list flexinode page.

patsas’s picture

Component: User interface » Code

I got the same problem using none flexinode page.

Here's a fix that solved the problem.

in the function indexpage_page_list add DISTINCT to the select statement:

Line 209: $sql = "SELECT DISTINCT r.title, n.nid, r.teaser FROM {node} n LEFT JOIN {term_node} t USING (nid) INNER JOIN {node_revisions} r USING (nid) WHERE type='%s' AND t.tid=%d";

Line 215: $sql = "SELECT DISTINCT r.title, n.nid, r.teaser FROM {node} n INNER JOIN {node_revisions} r USING (nid) WHERE n.type='%s' AND (r.title REGEXP '^[^[:alpha:]].*$')";

Line 219 $sql = "SELECT DISTINCT r.title, n.nid, r.teaser FROM {node} n INNER JOIN {node_revisions} r USING (nid) WHERE n.type='%s' AND (r.title LIKE '%s%%' OR r.title LIKE '%s%%')";

coplan’s picture

That doesn't seem to solve the problem.

I just realized one thing that may be important. I'm using a nodetype that tracks revision history. It seems that the only nodes that appear in duplicate are nodes that I have revised a number of times. It seems to have an entry for each revision.

carlosparamio’s picture

Status: Active » Reviewed & tested by the community

I disabled "teaser in tooltip" functionality to fix this, because the problem was with the join to node_revisions. Anyway, that function was buggy, because it showed the content on the database, without filtering the text with the input format selected for the node.

nancydru’s picture

@patsas: Actually if you change the USING to USING (nid, vid), this should go away.

If I get CVS access, this will be done. There will also be a setting to disable the teaser as a tooltip.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Reviewed & tested by the community » Patch (to be ported)
nancydru’s picture

Status: Patch (to be ported) » Fixed
nancydru’s picture

Status: Fixed » Closed (fixed)