Modules:

  • project-5.x-1.2
  • project_issue-5.x-2

Page /project/issues (screenshot) displays note "Нет проблем." (RUS: "No issues found."), but there is open issues (screenshot of one of them).

Access permissions: all users can access issues (screenshot).

You can check it by yourself at http://www.desu.ru/project/issues

No access control modules at all, Drupal 5.5.

CommentFileSizeAuthor
but_there_is_at_least_one.jpg32.26 KBgildedgod

Comments

gildedgod’s picture

Version: 5.x-2.x-dev » 5.x-2.2

Version fix: i'm using project_issue-5.2-2, not "dev"

P.S. and "upload" form here displayed paths like "http://www.drupal.org/files/%filename%" to me, so, I used this paths to illustrate issue, but it seems that real path of uploaded images is "http://www.drupal.org/files/issues/%filename%", so you can find screenshots there..

gildedgod’s picture

I investigated the problem and found that page /project/issues displays only that entries in table `project_issues` which has value 'assigned' <> 0.

So, only after you assign issue to somebody, it will appear in list, otherwise it's stays hidden no matter what will you do...

gildedgod’s picture

Added user with uid = '0' and name = 'guest' and it started to work.

Problem code was:

  if (!$comments) {
    return array(
      'sql' => db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {project_issues} p ON p.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON p.assigned = u.uid WHERE n.status = 1 AND ('. implode(') AND (', $sql) .')'),
      'count' => db_rewrite_sql('SELECT COUNT(n.nid) FROM {node} n INNER JOIN {project_issues} p ON p.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON p.assigned = u.uid WHERE n.status = 1 AND ('. implode(') AND (', $sql) .')')
    );
  }
  else {
    return array(
      'sql' => db_rewrite_sql('SELECT DISTINCT(n.nid), n.changed FROM {node} n INNER JOIN {project_issues} p ON p.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON p.assigned = u.uid LEFT JOIN {comments} c ON c.nid = p.nid LEFT JOIN {comment_upload_files} cu ON p.nid = cu.nid LEFT JOIN {files} f ON n.nid = f.nid WHERE n.status = 1 AND ('. implode(') AND (', $sql) .')'),
      'count' => db_rewrite_sql('SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN  {project_issues} p ON p.nid = n.nid INNER JOIN {node_revisions} r ON r.vid = n.vid INNER JOIN {users} u ON p.assigned = u.uid LEFT JOIN {comments} c ON c.nid = p.nid LEFT JOIN {comment_upload_files} cu ON p.nid = cu.nid LEFT JOIN {files} f ON n.nid = f.nid WHERE n.status = 1 AND ('. implode(') AND (', $sql) .')')
    );
  }

INNER JOIN {users} u ON p.assigned = u.uid
- for unassigned issues there is no entry in "users" table, so, it returns nothing...

gildedgod’s picture

Status: Active » Closed (fixed)

Just create user with id="0" and any name you like =)

It works =)

aclight’s picture

@gildedgod: Drupal automatically creates a user with uid=0 for you, because uid=0 is the anonymous user. I don't know why you didn't have that row in your {users} table already.

gildedgod’s picture

@aclight: it's a long story of upgrades and database corruptions. Probably, it was accidentally deleted.