-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing Group Mailboxes Does Not Work #9028
Comments
Might be fixed by #8702 |
Please see my notes added to bug #8745 - I think CSS as a possible hidden assign button may be central to the issue. Cheers. |
Any further exploration of this issue please or temporary fixes? Thanks. |
I use all my patches in production where I work, problem is that the Email module IMO is deeply flawed after it was all reworked and even with my patches it still needs more work to fix it properly. |
Thanks tsmgeek - it's categorised as critical, it's been open 13 days and nobody is keeping us up to date with whether anything is going on. I'm probably going to leave SuiteCRM once and for all. It's been an absolute disaster in one way or another for so long now. As I write, 1000+ issues. If your anyone other than a software Engineer or you enjoy coding (and even then I would say that the resources would be used better elsewhere) then you'd be out of your mind (like me) to have been patient over the last 12 months. This is only going to get worse with people leaving en masse. My contact is apparently away for three months. I've tried and the probject just has been so badly run it's beyond saving. Whilst there will always be the brigade that say that you should expect nothing from open source and you'd not be disappointed, it rather begs the question why they are there in the first place, what need they are actually trying to fulfill or anything else. The amount of coding involved in fixing these issues would justify those same coders regrouping and abandoning this altogether. |
This issue has been mentioned on SuiteCRM. There might be relevant details there: https://community.suitecrm.com/t/basic-setup-with-group-email/77776/3 |
I can confirm this is still an issue in 7.12.8. I've looked everywhere for a solution or at least a clue to what is going on. This seems to be the only open ticket regarding this issue, others have been closed that documented it better because they were "duplicates". Anyway, I made a video of the problem. I think this demonstrates what's going on. https://vimeo.com/823530686/6ebb9faee5?share=copy |
Ok found a bunch of issues, trying to solve. I have group inbound email working. (kind of). Here is one major problem: In SugarFolders.php in the function retrieveFoldersForProcessing…
That works and shows folders that are group folders that are subscribed to by the user and lets admin see all the folders. However...... One other problem I'll look into next is in the "folders" table, "is_group" is not getting populated when a group email account is added. That's tomorrows problem. Anyway, I manually made "is_group" =1 for the group folders in the "folders" table and it works. |
This issue has been mentioned on SuiteCRM. There might be relevant details there: https://community.suitecrm.com/t/does-anyone-have-group-emails-working-for-users/88944/7 |
@pstevens71 Excellent find! Keep going! EDIT: Does #8702 fix this issue, show folders that are group folders, and write to the |
@chris001 sort of the fix proposes as part of it changing this:
That won't work, I tried: the 1 needs to be in quotes like this:
The other proposed fixes don't address this specific problem. The second part of the problem is that when an Inbound email account is saved, the "is_group" field is not getting populated. I'm thinking something like this around line 221 of modules/InboundEmail/Save.php to check if the inbound_email table has "is_personal=0", in which case, it's a group account and the folder records should be updated where is_group = 1. I haven't tested yet, but here's what I'm thinking....
then in the record creation like this (the is_group I added):
|
actually, fixing the one line: if ($item['is_group'] === '1' || $item['created_by'] === $user->id || is_admin($user)) { Fixes the group emails on the front end, but in email settings, it crashes out the subscribed folders selection. @chriss001 I'll try those other two changes in conjunction with this one tomorrow and see if they fix the folder selection timing out. Thanks for suggesting that. Fingers crossed. |
@pstevens71 Here's some more places of interest in the code, in case these help:
SuiteCRM/modules/Emails/EmailsController.php Line 954 in d0f078b
|
Thanks @chris001 I solved my problem with the user profile crashing out. Thanks to @pgorod he suggested my === was too restrictive. So I changed it to the following (at least I have group emails working!!). Next step is to solve the write is_group =1 to the folders table on save of an inbound email account and we'll be almost there. The third problem is that the folder selection in the user account doesn't actually work. It does write to the folder_subscriptions table, however, the user gets access to ALL group accounts, not just the ones selected, so that needs to be fixed too. Here's the modified line. I've been doing alot of testing and this seems so far to make everything work smoothly in terms of the user seeing the folders and user profile not crashing out.
|
OK I have it working. Problem number 2 solved. Still have some testing to do. I modified the public function save($addSubscriptions = true) to check the inbound email account for is_personal and then set is_group based on the opposite of that. I've tested for updated records and works. I've also tested for adding new inbound email and it works. However, while testing I'm finding that folders from deleted inbound email accounts are not getting removed. That seems to be another issue to chase down. Should I open another issue for that or keep all this here? Here's what I've done:
|
Good work!
I looked over the code, when it deletes inbound email accounts, there's an option or function to remove the folders. |
@chris001 I know there is a function that supposed to do that. It doesn't seem to be working. When I delete an Inbound account it doesn't remove the folders. I'll troubleshoot that one next. |
I've done some more testing and when a inbound email account is deleted, it does indeed mark the inbound email account "deleted = 1" However, the "public function delete()" doesn't seem to be being called at al in SugarFolders.php. It looks like it's designed to do the job, it's just not being triggered. I tried to log the variables in the function on delete and nothing was outputted. So at least that's a start! |
OK I added a PR for the code to update is_group value in group folders: https://github.com/salesagility/SuiteCRM/pull/10059/commits |
Ok problem #3 Solved. I'll be adding a PR. Problem #3 is that when an inbound group email account is deleted, it doesn't mark the folders as deleted=1 and users still have access to them. This functionality is already built in SuiteCRM but is never called. I've managed to call it from /modules/IndboundEmail/Delete.php successfully. Here is what needs to be added to Delete.php
|
When group email accounts are deleted the associated folders don't get marked as deleted=1. This means they show up for users in folder selection. They should be marked as deleted when the inbound group email account is deleted. There is in fact, functionality to do this in SugarFolders.php but is is not called when an inbound group email is deleted. This additional code just calls the existing function delete() when an inbound email account is deleted.
Ok I've solved all the problems and have group emails working 100%! There's lots of little changes to the JS required to get this to work with folder subscriptions as well as, I had to use the existing SecurityGroups, so it will only work in 7.13+ where Inbound Emails module has a relationship to SecurityGroups. Might try to figure out how to get the last part working in 7.12 later. The major problems in addition to the ones I just fixed are that the JSON output to the user profile where the user selects the folders doesn't account for a second array in the JSON {"groupFolders"}... Also, due to various other functions groupFolders were appearing twice in the JSON. So had to fix those and fixt the JS to deal with the new JSON structure that now includes a groupFolders array. In addition the existing JS had to be modified not to pull in the child folders and only list the parent folders in the select HTML element. Also I ran into the click and select functionality wasn't working, which I fixed and also the first item in each JSON array is --None-- so I had to deal with the second one and not show it. I've tested and I can add group folders as admin. I can see all folders and select/deselect ones I don't want to see in my personal folder settings. I can also create a security group, add a user to the group, and the user can see the group folders in addition to any personal folders they may have. The user can also select/deselect folders they want to see in their personal folder settings (assuming they have access). So my question if anyone can help, is that some of these changes apply to both 7.12 and 7.13+(core) and some only apply to 7.13+(core). Should I do separate (duplicate) pull requests for each version? |
@pstevens71 Excellent work. You can do one PR, and for each "commit" in the PR, comment whether the commit applies to 7.12 and 7.13+ (core), or only 7.13+(core). The maintainers team will read your comments on each commit, and "cherry-pick" each commit, and apply the commit to the relevant branch/release version you say it's made to fix. |
thanks @chris001 will do. I just spent most of today testing and adding the changes to another installation for testing. Got it working there too, so I'm pretty confident at this point the changes work. |
OK I created a new issue in the "core" branch where all the changes and explanations are linked. You will need 7.13+ to make all this work because prior, there is no relationship between security groups and inbound emails. |
This issue has been mentioned on SuiteCRM. There might be relevant details there: https://community.suitecrm.com/t/problem-with-outgoing-mail-account/93445/2 |
There is no ability to assign access to Group Mailboxes to users via user admin or the group mailbox itself.
If I am not mistaken (and one of the Devs John, Maintainer) hasn't had any luck either, then a CRM without an ability to communicate and interact is a very serious issue and, I would propose that whatever issues there are with the functionality needs to be resolved as a priority. I am running the latest version of Suite CRM on a Linux Server with MySQL (although not obviously relevant).
Thanks and Happy New Year.
The text was updated successfully, but these errors were encountered: