Adding issue tags without a comment or change in other metadata does not work

Dave Reid - February 20, 2009 - 00:14
Project:Project issue tracking
Version:6.x-1.x-dev
Component:Comments
Category:bug report
Priority:normal
Assigned:evoltech
Status:active
Issue tags:6.x-1.0 blocker, drupal.org upgrade
Description

Anytime I edit one of my project issue comments, I get an error message "You must enter a project to navigate to." when I press Save.

#1

Damien Tournoud - February 20, 2009 - 00:15
Status:active» duplicate

Duplicate of #367419: Editing issue follow-up comments broken.

#2

Dave Reid - February 20, 2009 - 00:15
Title:Editing project issue comments broken» Editing and adding blank project issue comments broken
Status:duplicate» active

Also, if I try and just add a tag on an issue but leave the comment body field empty, I get an "You must either add a comment, upload a file, or change something about this issue." error.

#3

Dave Reid - February 20, 2009 - 00:17
Title:Editing and adding blank project issue comments broken» Adding blank project issue comments broken
Project:Drupal.org infrastructure» Project issue tracking
Version:<none>» 6.x-1.x-dev
Component:Drupal.org module» Comments

#4

aclight - April 26, 2009 - 16:05
Issue tags:+6.x-1.0 blocker

I just tested this and adding only a tag to an issue but not changing anything else gives an error. Adding as a 6.x-1.x blocker.

#5

webchick - April 26, 2009 - 20:18

#6

aclight - April 26, 2009 - 21:58
Priority:normal» minor

#7

dww - April 26, 2009 - 22:03

Uhh, I don't think this can both be a "blocker" and "minor". ;) aclight, what's up with #6?

#8

aclight - April 26, 2009 - 22:05
Title:Adding blank project issue comments broken» Adding issue tags without a comment or change in other metadata does not work
Priority:minor» normal

Sorry about the last priority change--I just wanted to see if that worked, and it obviously did.

As I stated in comment #4, adding a tag to an issue but otherwise not changing anything does not work on d.o. However, on a local installation of the drupal.org testing profile, with versions of project, project_issue, and comment_alter_taxonomy updated to today's HEAD versions, I can't reproduce this behavior. So I wonder if there is something else on d.o, or perhaps some kind of caching or something, that's causing the problem.

I'm changing the issue title to reflect the fact that the problem seems to be exculsive to adding (and possibly removing) tags.

#9

earnie - May 7, 2009 - 21:29

Issue tag: I've noticed the required comment happen when I tag one issue without comment which works fine and then go to a second issue to do the same thing then I'm forced to add a comment.

Other metadata: Today I had a comment go missing when attaching a file. I uploaded the file first before entering the comment.

#10

dww - May 7, 2009 - 22:04

@earnie: First point is indeed this issue here, and yes, it does seem inconsistent. Previewing issue tags is all whacky, too, and I think that's related to the bug described here:
#367922: Term changes in issue not being properly displayed in emails

The other issue has nothing to do with project_issue, it's a comment_upload bug:
#379470: Change in the issue description is discarded after clicking on the attach button

#11

evoltech - September 12, 2009 - 00:06
Assigned to:Anonymous» evoltech

I was able to reproduce this issue and will start working on a fix.

#12

evoltech - September 19, 2009 - 00:47

Just wanted to provide an update here. While working on this today I think I narrowed the issue down to
includes/comment.inc:
project_issue_form_comment_validate() which is the extra validate function
for the project_issue_form_comment_form_alter (overriding the form_comment)
form. The issue is with line 309:
if (!empty($form_state['rebuild'])) {
return;
}
I am not sure where this is getting set, but I will keep looking into it. I am thinking maybe this is an issue with the #ahah code.

#13

evoltech - October 4, 2009 - 00:33

Curious: The comment_alter_taxonomy module is what enables this feature on d.o, but is there a use case that would make it so that we should be checking for a change in taxonomy even if this module is not installed? For now I am assuming that the comment_alter_taxonomy module is a requirement for checking for changes in taxonomy.

#14

evoltech - October 6, 2009 - 01:00

On closer look it appears that the $form_state variable is not being passed on correctly (maybe just not including the altered taxonomy) when a project_issue is submitted for preview. I have verified that this is not a bug in comment_alter_taxonomy as it works fine in non-project_issue node comments.

This looks like it is an issue that deals with forcing the rebuild of the comment_form on preview. This is done in project_issue_form_comment_form_alter() by setting the the preview button to #type submit, and again if the pid changed from underneath us in project_issue_form_comment_validate().

 
 

Drupal is a registered trademark of Dries Buytaert.