I have recently started to implement this module in our drupal 7 intranet site. The issue I am facing is when the mailbox has email from a user in the valid email domain and automatic account creation is disabled, I get the following error:
Fetching mail for IT Support...
Error messageWarning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of D:\webroot\mpgportal7\public\drupal\includes\entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of D:\webroot\mpgportal7\public\drupal\includes\entity.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 184 of D:\webroot\mpgportal7\public\drupal\sites\all\modules\entity\includes\entity.controller.inc).
Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 354 of D:\webroot\mpgportal7\public\drupal\includes\entity.inc).
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7409 of D:\webroot\mpgportal7\public\drupal\includes\common.inc).
The website encountered an unexpected error. Please try again later.
If allow creation of accounts, it properly processes the email and creates the ticket.
Comments
Comment #1
jeremy commentedUnfortunately this is not currently supported by the module. What would you prefer the module do with this sort of email? Map it to a specific catch-all email account? Ignore the email altogether?
Comment #2
gardnerjp commentedI want it to do the following based on description of option:
You can override the global setting for autocreating users by selecting an option in this list. If enabled, new user accounts will be automatically created if emails are received from unnknown email addresses. If disabled, notification emails will be sent when emails are discarded notifying the sender that they have to register to be able to create or update support tickets via email.
Please elaborate? If the module does not support this, why have the option to enable this functionality.
Other option would be to allow creation of tickets for all emails and have them auto assigned to specified user. If no specified user, then send notification that registration is required first.
Our drupal is integrated with LDAP and so they normally get account created as soon as browser opens. But, if they send email first, I want to control that and not get error.
Comment #3
jeremy commentedI stand corrected. I forgot about that feature, it was originally added here:
#544268: Make auto-account creation optional
Evidently the functionality is simply broken in the 7.x port of this module, thanks for reporting it! Patches welcome, otherwise hopefully we'll have a chance to review/fix it sooner than later.
Comment #4
gardnerjp commentedIt breaks when drupal_mail gets called.
Comment #5
nikhilrdeshpande commentedI am having exact same errors.
We do not want automatic creations of users, But want to fetch the email.
How was this issue resolved?
Thanks
Nikhil
Comment #6
jeremy commentedIt's not yet resolved; increasing the priority.
Comment #7
jeremy commentedComment #8
BManuel commentedHi Jeremy what is the ETA on this, would you need us to chip-in to get this thing done asap.
thanks
BM
Comment #9
daften commentedDuplicate: #1760720: Using support module with basic settings (and mail integration) doesn't work
More info with error messages there.
Comment #10
daften commentedAlso need this fixed ASAP :) Can I help?
Comment #11
BManuel commentedHey Daften,
I could not wait, so I switch to osTicket https://github.com/osTicket/osTicket-1.7 does the job very well.
BM
Comment #12
daften commentedThanks for the update, I'll look at that system and try to fix this bug :)
Comment #13
daften commentedFound more info.
The problem is when notifying.
in the hook_mail function, support_mail_tokens is called, that causes the problem.
Further down, in that function, when node_view is called (line 1491)
It probably starts with this message:
Notice: Trying to get property of non-object in support_mail_tokens() (line 1466 of /usr/share/drupal7/studenteninternet/sites/all/modules/support/support.module).
And I think the problems begin because $nid is empty. That then again comes from $params being empty in support_mail. That's because $params is empty in _support_mail_deny.
Don't know how to fix this though
Comment #14
zietbukuel commentedAny update on this?
Comment #15
HypervisedEd commentedI'm just curious, how can a module be considered a release candidate when such a basic function of the module breaks the entire module? This module isn't ready for a Drupal 7 production site if it breaks this easily.
I think this really should be re-branded as a dev version for drupal 7 in my opinion, especially when the module isn't being supported (this issue has been breaking sites for months).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1466 of /var/www/drupal/sites/all/modules/support/support.module).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /var/www/drupal/includes/entity.inc).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1480 of /var/www/drupal/sites/all/modules/support/support.module).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->load() (line 178 of /var/www/drupal/includes/entity.inc).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1482 of /var/www/drupal/sites/all/modules/support/support.module).
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 219 of /var/www/drupal/sites/all/modules/entity/includes/entity.controller.inc).
Warning: array_flip(): Can only flip STRING and INTEGER values! in DrupalDefaultEntityController->cacheGet() (line 355 of /var/www/drupal/includes/entity.inc).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1483 of /var/www/drupal/sites/all/modules/support/support.module).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1483 of /var/www/drupal/sites/all/modules/support/support.module).
Notice: Trying to get property of non-object in support_mail_tokens() (line 1484 of /var/www/drupal/sites/all/modules/support/support.module).
Notice: Undefined property: stdClass::$type in _node_extract_type() (line 385 of /var/www/drupal/modules/node/node.module).
Notice: Undefined property: stdClass::$nid in node_build_content() (line 1425 of /var/www/drupal/modules/node/node.module).
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7663 of /var/www/drupal/includes/common.inc).
The website encountered an unexpected error. Please try again later.
Comment #16
daften commentedAgreed
Comment #17
RaceCorp commentedSo maybe not the best way to approach it, but I seemed to have gotten it to at least not fail on me for fetching emails when automatic account creation is disabled. It's a hack, but it worked. Line 1324 of support.module add:
if(!$param['nid']) return;
Hope that leads to a better solution.
Comment #18
RaceCorp commentedAlso had to add
return user_load(1); //Set to admin so it doesn't get lost
to line 721 of support.module so that the tickets aren't dropped on the floor.
(Sorry about the nonexistent patch files...Was having troubles with git...)
Comment #19
ryan.ryan commentedRaceCorp, could you provide the context of the code surrounding what you added. The code for you param nid doesn't fit on line 1324 anymore.
Comment #20
drein commentedI have the same problem, but is this module abandoned? the hack you suggest prevent only the errors, or is a working solution? sorry but after having configured the module, spending time to setup the system, it is absurde that a rc2 is in this state!
Comment #21
RaceCorp commentedSorry, here's the context of #17
Here's the context of #18
Comment #22
purencool commented