Casetracker - case comment replies just won't work :(

KrisBulman - August 30, 2009 - 03:14
Project:Mail Comment
Version:6.x-1.0-beta4
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

I've followed the detailed instructions to the T, but still get this error when replying to a case via email and running Cron:

warning: array_keys() [function.array-keys]: The first argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 202.
warning: array_shift() [function.array-shift]: The argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 205.
warning: array_keys() [function.array-keys]: The first argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 202.
warning: array_shift() [function.array-shift]: The argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 205.
warning: array_keys() [function.array-keys]: The first argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 202.
warning: array_shift() [function.array-shift]: The argument should be an array in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 205.
user warning: Table 'site_189.casetracker_project' doesn't exist query: SELECT nid FROM casetracker_project WHERE project_number = 0 in /atrium-1-0-beta2/sites/all/modules/contrib/casetracker/casetracker_mail.module on line 211.

#1

KrisBulman - August 30, 2009 - 04:26

instructions found here: http://drupal.org/node/542118

Also noted a bunch of other people with the same error here: http://drupal.org/node/460854

#2

KrisBulman - September 2, 2009 - 15:51

Modules installed:

Mailhandler 6.x-1.8
Messaging 6.x-2.1 - Messaging, and Simple Mail
Notifications 6.x-2.1 - Notifications, mail to web, Notifications UI, Notification Views
Mail2web 6.x-1.0-beta3 - under notifications ^
Token 6.x-1.12

I noticed CTMail is also installed in the casetracker module.

mailhandler:
pop3 gmail account set up & working, can recieve and send to it, but get the above error when a message is downloaded

Messaging:
plain text is set up for authenticated users

Notifications:
set up, users are able to subscribe to tickets and do get emails

Mail2Web:
mailhandler inbox is proper mailhandler gmail address
expiration time set to Never
"Server string for message ID" is "example.com."
Message Cleaner set to "off."
"Mail2Web Content Types," chose "Case"

On all outgoing tickets, this line now appears at the top:
((( Reply ABOVE this LINE to POST a COMMENT )))

When cron is run on the site, the email is recieved, and the error listed in the first post of this ticket is generated. No content is generated on the site.

#3

mkmckinn - September 3, 2009 - 20:48

I'm encountering the same error.
I reviewed my MySQL tables and found there is no table called casetracker_project in my database.
I then reviewed the .Install files in Case Tracker and found something interesting in casetracker.install vor the Drupal 6 version: I didn't fid reference to casetracker_project in the schema section. However, when I did the same review of the casetracker.install, the Drupal 5 version, I did find reference to the it. Could the root cause of the error be the omission of this section?

#4

KrisBulman - September 11, 2009 - 04:20

Some good observations! Have you done any further testing on this?

#5

mkmckinn - September 25, 2009 - 22:25

Yup, I got rid of my error:
a) uninstall the casetracker feature
b) uninstall the casetracker module
c) run update.php
d) re-enable the feature, but this time with the latest (3.1) install edition
e) presto, no error.

So whoever changes the module code (3K larger) thank you (Jeff Miccolis?)

#6

Ian Ward - September 27, 2009 - 00:06

@mkmckinn you may not be getting an error, but the values for the casetracker attributes like status, priority, assignment, etc may not be preserved when you reply to a notification for a casetracker case.

@mkmckinn and @KrisBulman if this is the case, you can use the module here http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/development... as a temporary solution. Just enable the module and you should be all set. The reason this is in the sandbox and not in the module itself is because it's a temporary solution until a new version of the casetracker is released, for which there are plans.

Please try this out if applicable and let me know how it goes.

Thanks,
Ian

#7

alexharries - September 28, 2009 - 14:30
Title:Casetracker Case Comment Replies» Casetracker - case comment replies just won't work :(

@Ian Ward - could you possibly explain where to install that module, and with what folder name please? (I assume "mail2web_casetracker" but it isn't hooking by the look of it).

I'm so frustrated with Casetracker - I've been going round in ever-increasingly-complex circles for the last two weeks trying to get it working through the fog of hooks, PHP errors, etc. So frustrating - why can't ist just be simples?! :o(

This comes back when I try to e-mail mail2web:

This form should only be submitted within a properly configured group. Continue at your own risk.

    * warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 202.
    * warning: array_shift() [function.array-shift]: The argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 205.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 202.
    * warning: array_shift() [function.array-shift]: The argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 205.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 202.
    * warning: array_shift() [function.array-shift]: The argument should be an array in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 205.
    * user warning: Table 'groups_atrium.groups_atrium_casetracker_project' doesn't exist query: SELECT nid FROM groups_atrium_casetracker_project WHERE project_number = 0 in /var/www/html/sites/kssdeanery.org/httpdocs/sites/groups.kssdeanery.org/modules/contrib/casetracker/casetracker_mail.module on line 211.

#8

Ian Ward - October 12, 2009 - 14:42
Status:active» postponed (maintainer needs more info)

@alexharries it looks like you have the casetracker_mail module enabled. If you're using notifications and mail2web, you do not need the casetracker_mail module. Put mail2web_casetracker in a folder of the same name in the modules directory and then enable it. This module will simply make sure that when you reply to a notification for a case using mail2web/notifications, that the casetracker state values like status/priority will not get wiped out. Please let me know if this works.

#9

alexharries - October 13, 2009 - 01:11

Hi Ian, thank you for getting back to me - this has been hugely frustrating!! :o)

No promises (memory like a goldfish, loads of work to do, and memory like a goldfish...) but I'll try to evaluate your code tomorrow - very keen to give this a try!

I've taken to cobbling together a slightly custom module in the meantime which is primarily aimed at users who want to mail content to Open Atrium/Casetracker/OG. Hopefully it might have some useful bits for other - much more capable - coders! I'm hoping the design should be flexible enough to allow extension. The main reason for doing this is because we have the luxury of catch-all e-mail inboxes here, so the module can handle e-mails like case-12345@groups.example.com, or even (PURL of a project) facilities-helpdesk@groups.example.com, but even then there's some other features which might provide some ideas for someone else (e.g. a subject like "Project 1332 new task: remember to change cron settings" will end up as a case in project 1332, as would an e-mail sent to project-1332@groups.example.com with the subject "New helpdesk case foo bar noodle", where 1332 is the NID). It's using some basic but hopefully extensible search/replaces, so "new case" can also be referred to as "new task", "new job", "new problem", etc.

That said, the code is hugely buggy at the moment, but it's (kinda!) working - the next thing I need to tackle before asking for criticism is to see whether I can hook into outgoing messages to alter (depending on config settings) the "from" header on outgoing notifications so the module can properly implement one e-mail address per node.

The other problem is the module really needs to request a modification to Mailhandler core's handling of hooks (as it stops processing a node after it encounters the first hook_mailhandler, which seems odd to me, unless I've not understood the API properly?). I have no doubt it's been done the way it's been done for a reason, so I expect a firm 'no' - d'oh!

#10

Ian Ward - October 13, 2009 - 12:21

@alexharries sounds like an interesting setup you have going. In regards to hook_mailhandler stopping after the first call, in mail2web there is a setting that will let you pass the object back to mailhandler if mail2web is not able to do anything w/ it. This setting is "Passthru to mailhandler module."

Please let me know how the testing goes.

#11

ezraw - November 6, 2009 - 03:01

Installed and tested the module in #6 today and it seems to be working fine for me.

#12

Ian Ward - November 16, 2009 - 17:50
Project:Mail to Web» Mail Comment
Version:6.x-1.0-beta3» 6.x-1.0-beta4

Switch to mailcomment project. Mail2web is now known as "mailcomment" due to a trademark issue with the name mail2web.

#13

Ian Ward - November 25, 2009 - 23:24

Note, if you're using mailcomment module now, then the module in #6 will not work w/ mailcomment. See http://drupal.org/node/641974#comment-2306912 and related thoughts there.

 
 

Drupal is a registered trademark of Dries Buytaert.