Closed (works as designed)
Project:
Privatemsg
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2013 at 21:47 UTC
Updated:
3 Jul 2013 at 22:22 UTC
When I hit the delete button on the theme side, regardless of whether any message threads are selected or not, an alert box shows:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText: Fatal error: Call to undefined function privatemsg_list_submit() in [...]/includes/form.inc on line 1464
I've added some text to the _privatemsg_list_field__participants() field, otherwise this is a vanilla install on Drupal 7.22. Any ideas?
Comments
Comment #1
ptmkenny commentedIf you clear your caches, revert to the 2.x-dev branch (without your custom code), and use a default theme (e.g., Bartik), do you still get the error?
Comment #2
emcniece commentedReverted, changed theme from Garland to Bartik, cleared cache and in that process the themed _privatemsg_list_field__participants() field code was removed... still getting the same error. Must be a module conflict...
I've managed to solve this by adding a custom module and some code to the init hook:
The issue is also being discussed over at http://drupal.stackexchange.com/questions/72721/use-privatemsg-admin-for....
Comment #3
ptmkenny commentedComment #4
devin carlson commentedWe've run into this with Drupal Commons in which the Commons Trusted Contacts module calls
privatemsg_list()to embed the message list into a Quick Tabs tab.The issue (which is explained nicely at http://drupal.stackexchange.com/a/11965/12457) has to do with the fact that custom menu router items are not directly related to privatemsg.module, nor privatemsg.pages.inc, so the system does not know that the privatemsg.page.inc include file is required to build the form, especially when the form is submitted and rebuilt via AJAX — which happens on 'system/ajax' (which, by default, would only know about files that use the 'privatemsg_list_page' page callback for their router items).
If you're calling
privatemsg_list()from your own module, you'll have to hook_form_alter/hook_form_id_alter the privatemsg_list form to do the following:Comment #5
emcniece commentedWow. Wow, wow... awesome. Just like that, eh? Another classic case of "misinformed developer" :)
Totally makes sense, thanks for linking out to some reading material. There's some free reputation waiting for somebody over at that first Stackexchange link ;)
Tested on the installation and it totally fixes the problem. Cheers!