Closed (fixed)
Project:
Project
Version:
x.y.z
Component:
Issues
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
18 Nov 2005 at 18:55 UTC
Updated:
10 Feb 2006 at 18:30 UTC
Jump to comment: Most recent file
Project does not seem to be loading components. I get a:
warning: Invalid argument supplied for foreach() in /home/eaberry/public_html/sites/cvs/drupal/modules/project/issue.inc on line 365.
error when I run the latest cvs version of project and i try and submit an issue to a project.
Setup:
Apache 2.0
PHP 5
MySQL 4.3
Drupal: 4.7 (cvs)
Taxonomy: On
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | issue_3.patch | 3.38 KB | Souvent22 |
| #12 | issue_2.patch | 2.37 KB | Souvent22 |
| #10 | issue_1.patch | 1.67 KB | Souvent22 |
| #5 | project.inc_save_components_properly_r2.patch | 1.58 KB | pfaocle |
| #3 | project.inc_save_components_properly.patch | 1.58 KB | pfaocle |
Comments
Comment #1
Souvent22 commentedUpon investigation, it seems that after validation, even though it's passing by reference, it does not hold the component value after it's transfomed. Don't know if this is a larger Drupal issue? or project.
Comment #2
pfaocleConfirmed here, too. It could be that the components aren't saving properly when a project is edited, as my existing projects' components load fine... but once edited, they are lost. The submit issue form after editing a project does not display any components, usually resulting in not being able to submit a new issue, as component is a required field.
Changing to correct version.
Haven't looked into this one any further yet...
Comment #3
pfaocleSeems the _update hook isn't saving the components correctly. Attached patch seems to fix, but needs review and proper testing.
Comment #4
pfaocleNope - doesn't quite fix. Fields seem to be saved correctly, but aren't being represented in the option tag properly:
The line break breaks being able to submit to any of the above components bar 'Miscellaneous'.
Comment #5
pfaocleAnother shot. It seems to work here, but I'm curious as to why ...update needs this and ..._insert doesn't.
Comment #6
pfaocleStill an issue with latest HEAD - can anyone confirm?
Comment #7
wilh commentedThis is still an issue with 4.6.0 release. Is there a patch for 4.6.0 or do I need to start over from CVS and patch from there?
Comment #8
pfaocleA new patch, adapted from this one from 'must'.
Comment #9
pfaocleOoops.
Comment #10
Souvent22 commentedPatch to fix compontns not saving AND fixes compontnes not carrying over and saving when you create an issue. I used to get 'You must specify a valid component' every time. This fixes that.
Comment #11
Souvent22 commentedNote: There is an issue with the projects taxonomy/category not being selected when you go back in and edit a project. However, I believe this is a taxonomy related issue, as the field is added via form_alter from the taxonomy module.
Comment #12
Souvent22 commentedRe-rolled, was missing 1 diff. Complete patch.
Comment #13
m3avrck commentedFixes creation of new issues, but doesn't fix follow ups for current issues.
Comment #14
Souvent22 commentedFound same issue in another part of the code.
New patch.
Comment #15
m3avrck commentedPatch works great, fixes all known issues when creating issues with project module, RTC!
Comment #16
nedjoThanks for the patch, this issue definitely needs fixing.
I'm wondering if this complex handling is needed. How do we handle the question of converting multi-line lists into arrays in other cases? I'm thinking that we do this in the profile.module. Here are some potentially relevant lines:
Can we do the same here?
Comment #17
dan_aka_jack commentedHi there,
Just wondering... is patch3 still required or has this patch been integrated into the CVS version of the projects module? I assume it is still required.
Many thanks,
Jack
Comment #18
dan_aka_jack commentedOK, I just tried applying patch 3 against version 1.140 of issues.inc and I've also tried updating to the very latests CVS code but I'm afraid neither fixed the problem described here:
http://drupal.org/node/44572
Thanks,
Jack
Comment #19
tfejos commentedI had the same problem. It seems to be resolved by issue_3.patch .
I need more tests to be sure about it.
(if I wont write more bug reports for project, then it is OK)
Project on 4.7 seems to be compatibile with 4.7.
Comment #20
dan_aka_jack commentedIs there any news about whether or not this patch will be entered into the CVS repository for the Project module?
Thanks,
Jack
Comment #21
Souvent22 commentedI'll re-roll this patch from head. Hopefully it goes it soon.
Comment #22
markus_petrux commentedIs it possible that this issue has already been fixed? Patch3 is for 1.140, but issue.inc is now 1.142 (2006/01/16).
/me asking 'cause I just have tested this module...
- created a project.
- created an issue, selecting one of the existing components.
- viewed issue, looks good.
- edited project, adding a new component to the list.
- edited issue changing the component, selecting the one that I just created.
- viewed issue, looks good.
It all worked for me.
Comment #23
nedjoThe problem was that validation wasn't being called just before the node was saved (presumably this is a change in the order of calls) so the components string wasn't being converted into an array (as this happened in
project_project_validate()). I've changed this to do call the conversion inproject_project_insert()andproject_project_update(), which appears to fix the issue. Fix applied.Comment #24
dan_aka_jack commentedHi there,
I've just tried installing the most recent code from the CVS but I'm afraid I still can't add a feature request / bug report to a project because I can't select any projects.
I have the taxonomy module installed (I need it). Does the taxonomy module still break the project module (I would try disabling the taxonomy module but I'm afraid I can't because it gets used so much).
Many thanks,
Jack
Comment #25
nedjoCan't reproduce this error, and it doesn't appear to be necessarily related to this issue.
Make sure you're creating a new project to submit issues on, as your existing data may have errors. If you still have problems, submit a separate detailed support request.
Comment #26
(not verified) commented