By Altitudes on Wednesday, 23 March 2016
Posted in Technical Issues
Replies 13
Likes 0
Views 498
Votes 0
Hello

On my site, I have set Settings > Users > Workflow > "Allow admin to view ESAD users" to No.

I have attached snapshots of a search done by a normal user, and by an admin respectively. Result should be the same but for admin:
1- You can only see 2 search results in quick list instead of 5
2- It says "19 results found" whereas there are in fact only 16 results

It looks like the search is performed including ESAD users, and then afterwards ESAD users are removed from the results... which is not the right way to proceed. Search should be performed excluding ESAD users.

One more thing: I think label "Allow admin to view ESAD users" should be changed. ESAD means nothing to your customers, this word is used nowhere else in the UI. So I would suggest you modify the following strings:
COM_EASYSOCIAL_USERS_SETTINGS_ALLOW_ADMIN_TO_VIEW_ESAD_USERS="Allow admins to view users with no community access"
COM_EASYSOCIAL_USERS_SETTINGS_ALLOW_ADMIN_TO_VIEW_ESAD_USERS_HELP="If this option is disabled, site administrators will not view users with no access to the community in the user listings."


.Fixed in ES 1.4.9
As it seems to take some time for you to provide an answer, I just wanted to add something that may simplify the solution

In my opinion, the option "Allow admin to view ESAD users" should be completely removed, so that admins would not be able to find ESAD users in frontend (they can go to backend if they need to).
Today, when this option is set to Yes, admins see the ESAD users in the lists, but are not able to see their profile (they get a 404 error). So what's the point?

I know you may be reluctant to remove a feature some of your customers may use, but considering that it is not working properly and that most of your customers probably did not understand what "ESAD users" means, I think that's not a problem
·
Thursday, 24 March 2016 18:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

I am sorry for the delay of this reply as last week we are actually on the midst of moving our office

Regarding the search on ESAD users, currently the universal search is actually based on the Joomla smart search and the only way for us to 'filter' these ESAD users is when the results return from Joomla smart search and EasySociall will further filter these ESAD users.

Anyway, I've added a fix on your dev for the returned results count. The count should no longer count in these ESAD users. I've also updated the language translation as per your suggestion Can you give it a try again ?

Below are the files I've modified:

JOOMLA/components/com_easysocial/controllers/search.php
JOOMLA/administrator/components/com_easysocial/includes/search/search.php
JOOMLA/components/com_easysocial/views/search/view.html.php
JOOMLA/administrator/language/en-GB/en-GB.com_easysocial.ini

And regarding the setting 'allow admin to view ESAD users' removal, i still think its up to admin to decide if admin want to show ESAD users in the listing or not. I will bring this to our developers and we will see what is the best approach to address this matter

Thanks again for your feedback and your suggestion.

Hope this help and have a nice day!
Sam
·
Monday, 28 March 2016 16:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you for the strings. Count of search results is working fine too now when ESAD listing is disabled

Regarding the issue:
1- You can only see 2 search results in quick list instead of 5

For my understanding, why is it not possible to have 5 search results when an admin performs the search, whereas it is possible when a normal user does?
·
Wednesday, 30 March 2016 06:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

I am sorry for the delay of this reply.

Em, by rights when smart search index these ESAD users, the 'access' for these indexed items will be 'special'. Thats also means only admin can 'view' them from the search. Thats is why, if you turn off 'allow admin to view ESAD users', those users are not appearing in the search listing.

As to why normal users able to search these users, can you try to purge your Joomla smart search index and re-run the indexing again? To do this, go to your Joomla backend under Smart Search component and click 'purge' index. Once the indexes purged, you then re-run the indexing again.

Let me know if the above help or not. If issue persist, can you pass me your normal user access so that I can try to search again your site? I actually registered myself at your dev site but I couldn't find where is the EasySocial search page

Please advise.
Sam
·
Wednesday, 30 March 2016 12:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you, your explanations are perfectly clear and it looks like you did what can be done at best

When there are some changes on a EasySocial user, is the Smart Search index refreshed automatically? Or do I have to launch indexing again from backend?
For example for the following changes:
- A normal user becomes an ESAD user (that's what we are talking of )
- A user changes his avatar (I noticed that index is not refreshed )
·
Wednesday, 30 March 2016 17:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

When there are some changes on a EasySocial user, is the Smart Search index refreshed automatically? Or do I have to launch indexing again from backend?
For example for the following changes:
- A normal user becomes an ESAD user (that's what we are talking of )
- A user changes his avatar (I noticed that index is not refreshed )


Regarding the above, I tested both scenario and the smart search did work correctly.

>> - A normal user becomes an ESAD user (that's what we are talking of )

When i switch a user profile from non-esad to esad, normal user is not able to search this user. I then switch again from esad to non-esad, I (normal user) can now search this user from toolbar search.


>> - A user changes his avatar (I noticed that index is not refreshed.

I also did the test on my local and after I updated my avatar and when someone search me, it show the new avatar I just updated.

Are these not working on your site? Please advise.
Sam
·
Wednesday, 30 March 2016 18:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Sam wrote:
When i switch a user profile from non-esad to esad, normal user is not able to search this user. I then switch again from esad to non-esad, I (normal user) can now search this user from toolbar search.

Yes indeed, but the Smart Search index entry is not updated: 'access' column should be updated to '3' (i.e. "special") and it is not. It seems to work because ES filters the Smart Search results to remove ESAD users. Which means that if you invert the scenario (a user indexed as ESAD becoming non ESAD), it won't work (as index will remain with the "special" access).
Sam wrote:
I also did the test on my local and after I updated my avatar and when someone search me, it show the new avatar I just updated.

Maybe we are not talking of the same thing: I'm thinking of the avatar shown in the quick search results (see attached snapshot, avatars are highlighted in yellow).

So... What is supposed to make the index being refresh?
·
Wednesday, 30 March 2016 20:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

So... What is supposed to make the index being refresh?

The smart search index will always be refreshed with the new value whenever there are an attempt to change the value in the database such as when a user updated their profile. I just test this locally and the access column did get updated correctly (from 1 to 3) whenever I switched profile type of non-ESAD user to ESAD profile.

By the way you also need to enable easysocial smart search plugin from plugin manager in order for the indexer to run correctly. I just checked your dev site and it seems like you have turned off the smart search plugin hence the index did not get updated correctly. I just enabled the following plugin from your dev site, "Smart Search - EasySocial Users" and the search result is now showing correctly.

Hope these help.
·
Thursday, 31 March 2016 12:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you, I don't know why the plugin "Smart Search - EasySocial Users" was unpublished, it is published on my production site, and dev site is supposed to be a copy of the production site

ESAD to non ESAD is working fine now ('access' changed in index). But avatar update is not. Please take a look at the attached snapshots:

1- Initial search
2- Search after the user has updated his avatar (by editing his profile) - No avatar showing
3- Search after I have run the indexer from backend (without clearing the index) - Avatar was updated correctly

Thanks
·
Thursday, 31 March 2016 17:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

Hm. Seems like the easysocial is running the indexer before the avatar is save completely hence it will causing the indexer to always get the default avatar instead of the uploaded avatar and store it inside the smart search database. We are not entirely sure where is this occurring within our easysocial saving process but I will log this issue into our codebase so our developers can take a closer look on this issue.

Thank you for your kind understanding.
·
Thursday, 31 March 2016 19:42
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, thank you.

For people looking for a workaround (by the time this issue is fixed), it is possible to periodically refresh Joomla Smart Search index by cron:
https://docs.joomla.org/Setting_up_automatic_Smart_Search_indexing
·
Thursday, 31 March 2016 19:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

Thanks for sharing.
·
Friday, 01 April 2016 11:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Altitudes,

Regarding the avatar not being index correctly in smart search, I've added a fix on your dev site and now updated user avatar should reflect the smart search index correctly Can you give it a try again? Below is the file I've modified at your dev site:

JOOMLA/administrator/components/com_easysocial/includes/avatar/avatar.php

The same fix will be added into next release of EasySocial as well

Thanks again for reporting these issues.
Have a nice day
Sam
·
Friday, 01 April 2016 12:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post