OK, submitting this one as new as per pulsifer's recommendations at this issue. Sorry details are sketchy, but I'll try to clarify when I get chance to look at this properly.
In short, the project drop down on the create/edit/follow up issue form isn't being filled. A quick debug told me that _project_projects_select_options() was returning an empty array, and the query:
'SELECT p.nid, n.title, d.name FROM {project_projects} p INNER JOIN {node} n ON n.nid = p.nid LEFT JOIN {term_node} t ON t.nid = n.nid INNER JOIN {term_data} d ON t.tid = d.tid INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE n.status = 1 AND p.issues = 1 AND d.vid = %d AND h.parent = 0 GROUP BY n.title ORDER BY d.weight, n.title'
(where %d is replaced with $vid for the projects vocabulary).
Removing ' AND h.parent = 0' fixes the problem, though I am unsure why just now. A couple of comments from pulsifer:
"It seems to assume that the "Project" keyword would be a root key (parent = 0), but it is not when used with Drupal v4.7... The easiest fix I found was to disable project's use of the taxonomy module (see above about replacing 'taxomony' with 'taxonomyXXX')"
Comments
Comment #1
pulsifer CreditAttribution: pulsifer commentedThat should say: "It seems to assume that the categories under the "Project" taxonomy would be root keys...". The problem is that they are not root keys, they are one level down from the root.
In order to make this query work, it needs to look to see if the term one more level up is a root. That would involve another join on the term_heirarchy table. Instead of:
it would be something like:
Notice its now looking to see if h2.parent = 0.
I haven't yet tried this because for my immediate purposes I'm not using the taxonomy module -- i.e., Project has some alternate code paths that kick in when taxonomy is not present, and those work find.
Another fix, BTW, is to only have one level of keys in the Project taxonomy (instead of two levels). This solves that query, but then some of the user interface related to project categories doesn't work.
Comment #2
pfaocleI can reproduce this on three instances of project module, all latest HEAD with beta 5, one being a totally clean install of core/project module. Marking critical as this prevents:
Comment #3
pfaocleHave just updated our project module this evening, and I'm not getting problems with this any more. Will test/check this out in more depth tomorrow, but I reckon this could be sorted?
Comment #4
fgmJust tested with RC1 (project.module 1.233 dated 03/27/2006), and the problem is still there.
Comment #5
pfaocleYep, still a problem with RC3 and today's CVS project module.
Comment #6
fgmStill there in Beta4 with project.module v1.238
Removing the
h.parent=0
test still fixes the issue momentarily.Comment #7
dwwbump: i've been looking a lot at this function recently due to http://drupal.org/node/74995. of course, thanks to http://drupal.org/node/60627, project no longer requires a taxonomy, even in 4.7 or HEAD. therefore, i don't believe this issue is still a bug. if there are no terms in the auto-generated project taxonomy,
project_projects_select_options()
doesn't hit any of the taxonomy-specific code, and all projects are returned. if you've started defining terms in that taxonomy, then (i believe) everything works ok.can someone please verify that the kinds of problems you were having are now resolved? my testing and review of the code seems to indicate this is no longer a bug...
thanks,
-derek
Comment #8
dwwafter a fairly length IRC session w/ fgm, i've decided this isn't a bug, and there's nothing here to fix...
the early 4.7.x versions of project didn't have the whole taxonomy thing ironed out to be very user friendly. it was mostly added for d.o, and even then, folks had trouble classifying their modules. however, now that http://drupal.org/node/60627 and http://drupal.org/node/64221 are fixed, everything works just fine...
the only reason the folks in this issue are having any trouble is that a) they were early adopters of 4.7 project module b) for better or for worse, they decided to use the project taxonomy, c) they only selected 2nd level terms for their projects, and d) they haven't tried to edit any of those project nodes since upgrading to a more recent project.module.
if you use the current code, all you have to do is:
a) remove all terms from the project taxonomy (if you don't want any of the taxonomy-based behavior)
or
b) edit each of your nodes, and the new form will force you to select a top-level term for each one. once they belong to a 1st level term, they'll show up in the list.
if we did what they're suggesting, and take out the check that the term we're using is top-level, things would explode into insanity on a site like drupal.org. all the different possible sub-categories of "modules" would show up in the list, it's not clear which sub-category (since a module can be in more than 1) a given project would be listed under, etc, etc.
therefore, "won't fix".
thanks,
-derek