Forums › Kleo Geolocation › Improvements suggestion and a bug
- This topic has 8 replies, 2 voices, and was last updated 6 years, 2 months ago by
Santi Azpilicueta.
-
AuthorPosts
-
May 20, 2016 at 2:27 am #52367
Santi Azpilicueta
MemberHi Eyal,
I am working on some customization to the groups directory on my site with this plugin, and I notice that initially the plugin does not show the right count for ALL groups, even those without a location, when the search filter is not used. It would be nice to be able to show the total group count as well as pagination for all the groups, and when the user is searching, display only those results. It would also be good to have a way to clear the ‘reset’ the search.
A solution I applied for initial count is to add defined(‘DOING_AJAX’) conditional to the gmwGlTotalQuery, so that it’s running only when during ajax requests.
Also, there’s a filter name bug in gmw-kleo-search-query-class.php line 236. It’s a wrong filter name there.
Thanks,
Roman.May 20, 2016 at 3:36 am #52371Santi Azpilicueta
MemberThere’s also a bug with the toggling of the submit button/loader. Currently, it’s toggling the element on every ajax start/stop, which also includes any other ajax requests being carried out on the page. Kleo in particular has a buddypress notifications listener, which triggers the toggling of this button. It would probably be better to use ajaxSend/ajaxComplete methods and check for the event type to specifically target the group/member forms.
May 22, 2016 at 9:48 pm #52387Eyal Fitoussi
MemberHello Santi,
I am working on some customization to the groups directory on my site with this plugin, and I notice that initially the plugin does not show the right count for ALL groups…
Fixed in version 1.2
It would also be good to have a way to clear the ‘reset’ the search.
a “reset form” trigger added to version 1.2
Also, there’s a filter name bug in gmw-kleo-search-query-class.php line 236. It’s a wrong filter name there.
Thank you for pointing it out. The filter renamed in version 1.2.
There’s also a bug with the toggling of the submit button/loader. Currently, it’s toggling the element on every ajax start/stop, which also includes any other ajax requests being carried out on the page. Kleo in particular has a buddypress notifications listener, which triggers the toggling of this button. It would probably be better to use ajaxSend/ajaxComplete methods and check for the event type to specifically target the group/member forms.
Thanks for finding the issue and suggesting a solution. ajaxSend/ajaxComplete applied to the plugin in version 1.2.
Thank you for all of the above. Version 1.2 is now available for update. Please update your plugin and let me know if all of the above is working as expected.
May 23, 2016 at 8:07 am #52394Santi Azpilicueta
MemberAwesome! Thank you so much! The new version looks great. There’s one bug that I see in my console though related to the ajax requests: Cannot read property ‘indexOf’ of undefined. Everything else works. 🙂
May 24, 2016 at 11:15 pm #52411Eyal Fitoussi
MemberYou are welcome Santi,
I am not sure the error as todo with the plugin. Have you tried deactivating the plugin to see if the error is gone?May 25, 2016 at 4:03 am #52416Santi Azpilicueta
MemberThis error has to do with the Kleo Notification ajax requests. In your ajax js, you should be checking to make sure that settings.data != ‘undefined’. This would solve these errors.
May 25, 2016 at 11:01 pm #52441Eyal Fitoussi
MemberThank you Santi for the suggestion. I am going to look into it and release an update as needed.
May 28, 2016 at 3:13 pm #52486Eyal Fitoussi
MemberHi Santi,
New version with a fix was uploaded to the server. Please update your plugin and let me know if it fixes the issue mentioned above.Thanks,
June 1, 2016 at 6:56 am #52538Santi Azpilicueta
MemberIt fixed it, thank you.
-
AuthorPosts
You must be logged in to reply to this topic.