User Registration Add-on emails to users sometimes missing activation link

I’ve been finding that for some percentage of users of my form (maybe around 10-20%), the notification email they receive is missing the activation link. Their pending accounts are still in the system and can be activated by an admin on the entry detail page, but the users receive the notification email with just a blank line where the activation link should appear.

This is creating confusion for the users and makes my client look unprofessional, which in turn frustrates my client and makes me look unprofessional.

Since the majority of the emails going out do contain the link, this is not a matter of me having something misconfigured. I’ve considered picking apart the code to see if I can figure out why it’s not always working, but I figured I’d start here and see if anyone else has experienced the same issue.

Update: I did end up poking around the code a bit. The method GF_User_Registration::replace_merge_tags() is where the {activation_url} merge tag gets handled. This method is called using the gform_replace_merge_tags filter. I’m wondering if changing the priority from 10 to something later could fix the issue.

I haven’t inspected the code base beyond this, and obviously modifying the plugin directly is a bad idea, but one could in their own theme/plugin use remove_filter() to remove the call at priority 10 and then another add_filter() call with a later priority. (I’ll probably end up testing this if no one responds here, but at the moment the client doesn’t have a staging site and I don’t want to mess with it on their live site.)

This issue indicates the notification is assigned to the wrong event. You’ll need to edit the notification in the Form Settings > Notifications area of the form to change the event setting to the “User is pending activation” choice.

Thanks! I’ve made this change and we’ll see if it resolves the issue. Any idea why it would sometimes work when the event was “Form is submitted” though?

Add-on feeds are processed in the background via a separate request. While the request is triggered during submission, the queued jobs are not always processed before the submission completes. It depends on how many jobs are in the queue, how much traffic the site has, the performance of the server hosting the site etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.