GravityKit / GravityView

The best and easiest way to display Gravity Forms entries on your website.
https://www.gravitykit.com/products/gravityview/
245 stars 62 forks source link

Issue/2076 user registration add on allow user activation on the view #2180

Open omarkasem opened 1 month ago

omarkasem commented 1 month ago

💾 Build file (cc3146ee0).

mrcasual commented 1 month ago

@Mwalek, please test.

Mwalek commented 4 weeks ago

@mrcasual I found a few issues:

  1. There is the following warning in the front end if you create a View and attach a form that is not a user registration form or don't create a user registration feed.Warning: Undefined array key "is_active" in /.../wp-content/plugins/gravityview/includes/fields/class-gravityview-field-user-activation.php on line 149
  2. There is a fatal error if the View is visited after deactivating the User Registration add on: Fatal error: Uncaught Error: Call to undefined function gf_user_registration() in /.../wp-content/plugins/gravityview/templates/fields/field-user_activation.php:15
  3. The activate button does not appear in the multiple entries listing if the user is not activated and the user activation field is added to both multiple entries and single entry tab. Screenshot 2024-10-31 at 6 01 01 PM

Summary

mrcasual commented 4 weeks ago

@omarkasem, please address the QA issues. Thank you.

omarkasem commented 2 weeks ago

@Mwalek 1,2 Done 3- I can't recreate that, I tried with table, list and it's working for me and showing.

rafaehlers commented 1 week ago

I'll test it!

Mwalek commented 1 week ago

@omarkasem I noticed that a different warning is now shown if a form without a user registration feed is attached to a View.

Warning: Undefined array key "addon_slug" in /.../public_html/wp-content/plugins/gravityview/includes/fields/class-gravityview-field-user-activation.php on line 149

To reproduce this warning, create a View, select a form without a user registration feed, add a User Activation field to the multiple entries tab, save the changes and visit the View on the front end.

Concerning cases where the user registration addon is not installed, I'd like to suggest the following message "Install/activate Gravity Forms User Registration Add-On".

I could no longer reproduce item number 3 (Activate button missing for unactivated users in multiple/single entry tabs). ✅

omarkasem commented 6 days ago

@Mwalek Thanks for noticing that, Both are fixed now with the latest commit

Mwalek commented 4 days ago

@omarkasem works like a charm, thank you!

cc. @mrcasual

rafaehlers commented 4 days ago

I don't see the point in having "Invalid activation key." for existing users that were previously activated in some way. This appears like an error, and you know, if you display something that looks like an error, the users will ask about it.

Would it be too costly (performance wise) to check every entry against existing users and in case they exist (as users) just display the same "The user is already active." message? In the case of my screenshot below, these two entries belong are associated with users created by the UR feed in the past. I'm not sure if there's a link we can establish to check that. Check if the user listed as the Entry Creator exists, perhaps?

Also, what is our text style for these messages? I don't like these messages ending with a period. Is that correct? Before: The user is already active. After: The user is already active

image

omarkasem commented 4 days ago

@rafaehlers Good point, I added a check now to see if the user already exist before the check for activation key and i also removed the dots at the end of line.

Please test and let me know what you think