#1902 - Search
Hi there,
I can't get the search by security group to work. I have added the 'Security Group' search field to the Contacts module search layout. I have contacts assigned to groups. But when I try to select any of my groups in the search, I get no results. Am I missing something?
Thanks, Tim
8 years ago
I've just looked in the log and I found this;
AND jt0.deleted=0 where ((accounts.securitygroup in ('2ab8eda0-0518-5c8f-14bb-554b48ce7c0c'))) AND accounts.deleted=0 ORDER BY accounts.name LIMIT 0,101: MySQL error 1054: Unknown column 'accounts.securitygroup' in 'where clause'
It appears that the search is looking for a field in the account table rather than matching against the securitygroups_records table...
8 years ago
Hi Tim,
It's a derived field so that SQL error shouldn't happen. Because of that, I think this will clear things up:
Go to Admin and run a Quick Repair & Rebuild, a Rebuild Relationships, and a Repair Roles.
If that doesn't do it for you, what version of SugarCRM or SuiteCRM are you currently on?
Thanks, -Jason
8 years ago
Hi Jason,
Still getting the same error unfortunately. We're running SuiteCRM 7.1.8
Thanks, Tim
8 years ago
Hi Tim,
Are you seeing that on the initial page or when you go to the 2nd page of the search results?
I just tested on SuiteCRM 7.1.5 and 7.2.2 (7.1.8 isn't available for download) and it looks to be working perfectly, unfortunately. Can you try removing it from your search layout, deploy, re-add it, and deploy again?
What other modules are installed? There is a chance that one of the key core files could have been overwritten that make this work.
8 years ago
Hi Jason,
When I try to remove the field from the search layout, it just pops back after saving. Any ideas?
The only additional modules that we have installed are DeDupit and KReporter.
Thanks, Tim
8 years ago
Odd. In that case it could be hinting towards file permission issues since it could not deploy it correctly when you removed it. What I would recommend:
The Quick Repair should build the vardefs correctly then after permissions are fixed so that SuiteCRM doesn't create the query incorrectly like it currently is.
8 years ago
Hi Jason, Will here from SalesAgility. In regards to this security group issue, this definitely seems like a bug with the field/definition being removed/hidden rather than permissions. I have worked with Timothy and on his environment to ensure permissions are set correctly(for Windows IIS). All of my other Studio changes are working well, even changes to the advanced search layout itself. What I did do was removed the definition from the custom/modules/Accounts/metadata/searchdefs.php manually. This meant it was moved to the 'Hidden' column. Interestingly, you can actually move the field to display and it saves correctly. It is only when you try to hide the field that the change is not saved/respected. The searchdefs.php file is apparently updated as windows detects it is changed, but the definition for the field is not removed. I also tried this on some other development instances and I experienced the same bug on differing versions of SuiteCRM(7.3.1. 7.1.8, 7.2).
8 years ago
Thanks Will, this helps. Based on what you are seeing it sounds like a platform bug or unexpected behavior, but I might be able to work around it depending on what I find.
I appreciate it!
8 years ago
Hi Jason, great. If it helps, both of these systems have been upgraded from SugarCRM, with the full version of Security Suite installed and most likely re-installed post upgrade due to this normally being required. I think it's possibly trying to remove the definition but it may be incorrectly named or the definition in searchdefs.php is not what it expects so cannot remove the array entry for the 'securitygroups' enum field as expected. Thanks, Will.