ultimatemember / ultimatemember

The easiest way to create powerful online communities and beautiful user profiles with WordPress
https://ultimatemember.com/
GNU General Public License v3.0
249 stars 185 forks source link

Admin filtering on date field not working for directories #657

Open tidengjay opened 4 years ago

tidengjay commented 4 years ago

Expected behavior The directory should show all profiles within the date range set in admin filtering.

Isolating the problem (mark completed items with an [x]):

Describe the bug A date field has been set within the profile functioning as membership validity. If the membership validity date is out of the date range selected in the admin filtering, the profile should not be shown. However, when such logic is applied, all profiles are not shown even if they fall within the date range selected in admin filtering.

Instead of admin filtering, I tried with the Filter feature and face no such issue. All profiles within 1 Jan 2020 to 31 Dec 2099 is shown.

To Reproduce Steps to reproduce the behavior:

  1. Go to any profile and set a date ending on 31 December 2019. Other profiles to have a date of 31 Dec 2020.
  2. Go to Directory settings, apply the admin filtering where validity is from 1 January 2020 - 31 Dec 2099.
  3. Check and validate in the directory area.
  4. The webpage will prompt that no profile match the search criteria.

Screenshots If applicable, add screenshots to help explain your problem.

Do you use UM extensions?

WordPress Environment

### Begin Install Info ### ## Please include this information when posting support requests ## --- Site Info --- Site URL: https://klgymnastics.my Home URL: https://klgymnastics.my Multisite: No --- Hosting Provider --- Host: DBH: localhost, SRV: klgymnastics.my --- User Browser --- Platform: Windows Browser Name: Chrome Browser Version: 83.0.4103.106 User Agent String: Mozilla/5.0 (Windows NT 10.0; Wi n64; x64) AppleWebKit/537.36 (KH TML, like Gecko) Chrome/83.0.410 3.106 Safari/537.36 ---- Current User Details -- Role: administrator --- WordPress Configurations --- Version: 5.4.2 Language: en_GB Permalink Structure: /%year%/%monthnum%/%postname%/ Active Theme: Education Soul 1.0.6 Page On Front: Home Page (#56) Page For Posts: Sample Page (#2) ABSPATH: /home/klgymnastics/public_html/ All Posts/Pages: 2 WP Remote Post: wp_remote_post() works WP_DEBUG: Disabled WP Table Prefix: Length: 5, Status: Acceptable Memory Limit: 40MB --- UM Configurations --- Version: 2.1.6 Upgraded From: 2.1.6 Current URL Method: Cache User Profile: Yes Generate Slugs on Directories: Yes Force UTF-8 Encoding: No JS/CSS Compression: No Port Forwarding in URL: No Exclude CSS/JS on Home: No --- UM Pages Configuration --- User: https://klgymnastics.my/user/ Account: https://klgymnastics.my/account/ Members: https://klgymnastics.my/directory/members/ Register: https://klgymnastics.my/membership/member-registration/ Login: https://klgymnastics.my/login/ Logout: https://klgymnastics.my/logout/ Password Reset: https://klgymnastics.my/password-reset/ --- UM Users Configuration --- Default New User Role: 0 Profile Permalink Base: user_login User Display Name: field Force Name to Uppercase: No Redirect author to profile: Yes Enable Members Directory: Yes Use Gravatars: Yes Gravatar builtin image: default UM Avatar as blank Gravatar: Yes Require a strong password: On --- UM Access Configuration --- Panic Key: Global Site Access: Site accessible to Everyone Backend Login Screen for Guests: No Redirect to alternative login page: Backend Register Screen for Guests: No Redirect to alternative register page: Access Control widget for Admins only: No Enable the Reset Password Limit: Yes Reset Password Limit: 3Disable Reset Password Limit for Admins: No Blacklist Words: 9 --- UM Email Configurations --- Mail appears from: KL Gymnastics Association (KLGA) Mail appears from address: webmaster@klgymnastics.my Use HTML for E-mails: Yes Account Welcome Email: Yes Account Activation Email: Yes Pending Review Email: No Account Approved Email: Yes Account Rejected Email: Yes Account Deactivated Email: Yes Account Deleted Email: Yes Password Reset Email: Yes Password Changed Email: Yes --- UM Total Users --- All Users(7) administrator(1) subscriber(2) assoc_lead_member(1) technical_member(1) gymnast(1) club(1) none(0) --- UM Roles --- Administrator (administrator) Editor (editor) Author (author) Contributor (contributor) Subscriber (subscriber) Assoc. Lead Member (assoc_lead_member) Assoc. Member (A) (assoc_member_author) Assoc. Member (B) (assoc_member_contributor) Technical Lead (technical_lead) Technical Member (technical_member) Judge (judge) Coach (coach) Gymnast (gymnast) Club (club) --- UM Custom Templates --- N/A --- UM Email HTML Templates --- N/A --- Web Server Configurations --- PHP Version: 7.4.7 MySQL Version: 5.7.30 Web Server Info: Apache --- PHP Configurations --- PHP Memory Limit: 384M PHP Upload Max Size: 32M PHP Post Max Size: 32M PHP Upload Max Filesize: 32M PHP Time Limit: 180 PHP Max Input Vars: 1000 PHP Arg Separator: & PHP Allow URL File Open: No --- Web Server Extensions/Modules --- DISPLAY ERRORS: N/A FSOCKOPEN: Your server supports fsockopen. cURL: Your server supports cURL. SOAP Client: Your server has the SOAP Client enabled. SUHOSIN: Your server does not have SUHOSIN installed. GD Library: PHP GD library is installed on your web server. Mail: PHP mail function exist on your web server. Exif: PHP Exif library is installed on your web server. --- Session Configurations --- Session: Disabled Session Name: PHPSESSID Cookie Path: / Save Path: /var/cpanel/php/sessions/ea-php74 Use Cookies: On Use Only Cookies: On --- WordPress Active Plugins --- Allow Multiple Accounts: 3.0.4 CMP - Coming Soon & Maintenance Plugin: 3.7.7 Code Snippets: 2.14.0 Contact Form 7: 5.1.9 Contact Form 7 Conditional Fields: 1.9.4 Download Manager: 3.0.98 Health Check & Troubleshooting: 1.4.4 Import and export users and customers: 1.15.6.8 Smart Slider 3: 3.4.1.8 Sucuri Security - Auditing, Malware Scanner and Hardening: 1.8.24 TablePress: 1.11 The Events Calendar: 5.1.4 The Events Calendar Extension: Remove Export Links: 1.1.1 Ultimate Member: 2.1.6 Ultimate Member - reCAPTCHA: 2.1.6 Ultimate Member - Terms & Conditions: 2.1.2 UpdraftPlus - Backup/Restore: 1.16.25 User Role Editor: 4.55.1 Wordfence Login Security: 1.0.5 Wordfence Security: 7.4.8 WP Activity Log: 4.1.2 WP Hide & Security Enhancer: 1.6.0.4 ### End Install Info ###
KyleNumann commented 3 years ago

I believe I am experiencing this issue as well, with a slightly different setup.

I have attempted to add an admin filter for registration date, but it always shows 'no users' despite various date range settings. Thanks for your work on this plugin.

Expected behavior Adding an admin filter for registration date from 29/09/2021 - 25/10/2021 should show users who registered between that date range.

Isolating the problem (mark completed items with an [x]):

Describe the bug Adding an admin filter for registration date from 29/09/2021 - 25/10/2021 shows no users, even though users have registered within that time frame. Changing the date range to other values also appears to have no effect, regardless of the settings the results on the front-end are that no users are shown. If a front-end filter option for registration date is added and used, the users are filtered by the date range as expected. I have tested with all plugins disabled, and the default Wordpress Twenty Twenty One theme activated.

To Reproduce Steps to reproduce the behavior:

  1. Start with an Ultimate Member install that has users registered over a range of dates
  2. Add a member directory with an admin filter for registration date
  3. Set the date range to a value that will match a number of registered users
  4. Check the member directory. No users are listed

Screenshots Here are the directory settings with admin filter added um-issue-date-range-directory-settings Here are the results with no users shown um-issue-date-range-directory-results-error Here is the directory without the admin filter, showing users registered within the date range um-issue-date-range-directory-default

Do you use UM extensions?

WordPress Environment

``` ### Begin Install Info ### ## Please include this information when posting support requests ## --- Site Info --- Site URL: https://devtechintonas.wpengine.com Home URL: https://devtechintonas.wpengine.com Multisite: No --- Hosting Provider --- Host: WP Engine --- User Browser --- Platform: Apple Browser Name: Chrome Browser Version: 94.0.4606.81 User Agent String: Mozilla/5.0 (Macintosh; Intel Ma c OS X 10_15_7) AppleWebKit/537. 36 (KHTML, like Gecko) Chrome/94 .0.4606.81 Safari/537.36 ---- Current User Details -- Role: administrator --- WordPress Configurations --- Version: 5.8.1 Language: en_US Permalink Structure: /%category%/%postname%/ Active Theme: Twenty Twenty-One 1.4 Page On Front: Home (#803) Page For Posts: Featured Stories (#795) ABSPATH: /nas/content/live/devtechintonas/ All Posts/Pages: 20 WP Remote Post: wp_remote_post() works WP_DEBUG: Disabled WP Table Prefix: Length: 14, Status: Acceptable Memory Limit: 40MB --- UM Configurations --- Version: 2.2.5 Upgraded From: 2.2.0 Current URL Method: Cache User Profile: No Generate Slugs on Directories: Yes Force UTF-8 Encoding: No JS/CSS Compression: No Port Forwarding in URL: No Exclude CSS/JS on Home: No --- UM Pages Configuration --- User: https://devtechintonas.wpengine.com/user/ Account: https://devtechintonas.wpengine.com/account/ Members: https://devtechintonas.wpengine.com/members/ Register: https://devtechintonas.wpengine.com/register/ Login: https://devtechintonas.wpengine.com/login/ Logout: https://devtechintonas.wpengine.com/logout/ Password Reset: https://devtechintonas.wpengine.com/password-reset/ --- UM Users Configuration --- Default New User Role: 0 Profile Permalink Base: user_login User Display Name: full_name Force Name to Uppercase: No Redirect author to profile: Yes Enable Members Directory: Yes Use Gravatars: No Require a strong password: Off --- UM Access Configuration --- Panic Key: Global Site Access: Site accessible to Everyone Backend Login Screen for Guests: No Redirect to alternative login page: Backend Register Screen for Guests: No Redirect to alternative register page: Access Control widget for Admins only: No Enable the Reset Password Limit: Yes Reset Password Limit: 3Disable Reset Password Limit for Admins: No Blacklist Words: 5 --- UM Email Configurations --- Mail appears from: Tech into Nashville Mail appears from address: techintonashville@technologycouncil.com Use HTML for E-mails: Yes Account Welcome Email: Yes Account Activation Email: No Pending Review Email: No Account Approved Email: No Account Rejected Email: No Account Deactivated Email: Yes Account Deleted Email: Yes Password Reset Email: Yes Password Changed Email: Yes --- UM Total Users --- All Users(74) administrator(5) um_company(45) um_individuals(24) none(0) --- UM Roles --- Administrator (administrator) Editor (editor) Author (author) Contributor (contributor) Subscriber (subscriber) Company (um_company) Individuals (um_individuals) --- UM Custom Templates --- N/A --- UM Email HTML Templates --- N/A --- Web Server Configurations --- PHP Version: 7.4.24 MySQL Version: 5.7.35 Web Server Info: Apache --- PHP Configurations --- PHP Memory Limit: 512M PHP Upload Max Size: 50M PHP Post Max Size: 100M PHP Upload Max Filesize: 50M PHP Time Limit: 3600 PHP Max Input Vars: 10000 PHP Arg Separator: & PHP Allow URL File Open: Yes --- Web Server Extensions/Modules --- DISPLAY ERRORS: N/A FSOCKOPEN: Your server supports fsockopen. cURL: Your server supports cURL. SOAP Client: Your server has the SOAP Client enabled. SUHOSIN: Your server does not have SUHOSIN installed. GD Library: PHP GD library is installed on your web server. Mail: PHP mail function exist on your web server. Exif: PHP Exif library is installed on your web server. --- Session Configurations --- Session: Disabled Session Name: PHPSESSID Cookie Path: / Save Path: /var/lib/php/sessions Use Cookies: On Use Only Cookies: On --- WordPress Active Plugins --- Ultimate Member: 2.2.5 ### End Install Info ### ```