Download & Extend

1 post in moderation

Project:modr8
Version:6.x-1.1
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

under admin/content/modr8 I have "1 post in moderation" even if there is no node that is marked as moderated. The only nodes I have on the test system are two "usernodes", which are not moderated. which db tables are relevant for modr8? Maybe I have some leftover from deleted nodes which causes this...

Comments

#1

The only table that is examined is the {node} table. Maybe another module is using the 'moderate' column for something?

Try running a query like

print(db_result(db_query("SELECT COUNT(*) FROM {node} WHERE moderate > 0")));

#2

Category:bug report» support request

unless you can provide more info, I don't think this is a bug with the module

#3

Category:support request» bug report

IF the only table examined is the nodes table, it IS a bug:

AttachmentSize
modr8_1node_01.gif 6.35 KB

#4

take a look at the 3 attached images

AttachmentSize
modr8_1node_02.gif 15.23 KB

#5

3 images say more than 3 words ;-)

AttachmentSize
modr8_1node_03.gif 2.29 KB

#6

the first shows the drupal's admin content view
the second shows the whole node table in phpMyAdmin
the third shows the resulting bug

this is a bug on my system, this is how testing modr8 started for me...

I don't care for the "one" as long as the count of "hidden" moderated content does not increase with more nodes on the system and as long the module works fine otherwise. Earlier or later I will try to fix this on my system myself, if it's still only my problem...

schnizZzla

ps the blacked out name is just the name of my superadmin, I don't want to publish it anywhere...

#7

Clearly, there are no nodes in moderation.

So, here's the relevant code, and maybe the problem is in the call to format_plural(). As you can see, I hard-coded the count to zero there, but maybe I only tested this with the locale module off. This message is only displayed when there are zero posts in moderation, so the bug is really at the display level, not anything deeper.

<?php
/**
* Menu callback; displays the content moderation form.
*/
function modr8_page() {
  require_once
drupal_get_path('module', 'modr8'). '/modr8_admin.inc';
 
 
$count_sql = db_rewrite_sql('SELECT COUNT(*) FROM {node} n WHERE n.status = 1 AND n.moderate = 1');
 
$page_sql = db_rewrite_sql('SELECT n.nid FROM {node} n WHERE n.status = 1 AND n.moderate = 1 ORDER BY n.changed DESC');
 
$result = pager_query($page_sql, variable_get('modr8_nodes_per_page', 10), 0, $count_sql);
 
 
$output = '<p>'. l(t('Show log of all actions on moderated content.'), 'admin/logs/modr8') .'</p>';
  if (
db_num_rows($result)) {
   
$output .= drupal_get_form('modr8_form', $result);
   
$output .= theme('pager');
  }
  else {
   
$output .= '<p>'. t('@items in moderation', array('@items' => format_plural(0, '1 post', '@count posts'))). '</p>';
  }
  return
$output;
}
?>

#8

Priority:normal» minor

"so the bug is really at the display level, not anything deeper."

I already thought that this not a bug serios bug that causes inconsistensy or something.
I'm busy with other things now, I'm going to track this issue reporting later.

Thanks so far, for the fast response.

#9

Status:active» closed (fixed)

I don't know how, but it disappeared. The zombie is dead. I did not pay attention to this issue for some time, so I don't know how and why...

#10

Version:5.x-2.2» 6.x-1.1
Status:closed (fixed)» needs review

Hi,

I have the same thing. No node marked as moderate=1 on database, but module says I have one moderated node...

Thanks!

#11

Status:needs review» active

no patch, no clear indication of the bug

nobody click here