Resolving Common Errors in TargetX Communities
Below is a list of common issues encountered in TargetX Communities along with their respective resolutions.
TX_MakeUniqueNickname: execution of BeforeInsert caused by: System.QueryException
Error: TX_MakeUniqueNickname: execution of BeforeInsert caused by: System.QueryException: Non-selective query against large object type (more than 200000 rows). Consider an indexed filter or contact salesforce.com about custom indexing. Even if a field is indexed a filter might still not be selective when: 1. The filter value includes null (for instance binding with a list that contains null) 2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times) Failing Query: SELECT Id, CommunityNickname FROM User WHERE CommunityNickname = :tmpVar1 Current Apex position:TX_UniqueNicknameHelper [8,1] Apex stack:Trigger.TX_MakeUniqueNickname: line 6, column 1 Class.TX_UniqueNicknameHelper.getMatchingUsers: line 8, column 1 Trigger.TX_MakeUniqueNickname: line 6, column 1
Cause: This error occurs when your Salesforce Org exceeds 200,000 user records.
Resolution: Submit a case to Salesforce Support and request the Nickname (API: CommunityNickname) field on User be indexed. If Salesforce Support asks for the query that is failing, provide the following:
SELECT Id, CommunityNickname FROM User WHERE CommunityNickname IN :nicknames
Applicant record has the wrong email address
- Go to the Contact record and select Disable Community User from the picklist:
- Navigate to Setup and search for Users.
- Click Edit.
- Update the Email on the User record.
- Save your changes.
- Go back to the Contact record and select Enable Community User from the picklist:
Note: the student will need to update their password after this process.
Code Coverage errors for Communities
See Code Coverage errors.
Community Login page doesn’t present an error when an invalid username or password is entered
Error: Your login attempt has failed. Make sure the username and password are correct.
Resolution:
1. Navigate to Setup and search for Visualforce Components.
2. Click on the TX_SiteLogin component.
3. Select Edit.
4. Copy the existing code to notepad as a backup.
5. Replace the code with the code from this file.
6. Re-apply any customizations you may have made to the login page text.
7. Save your changes.
Nickname isn't unique
Communities reset password link goes in a loop
Recommended workarounds:
If an Outlook user is experiencing this issue, ask them to perform the following [1]:
- Open Outlook.com in their browser.
- Go to Settings | Options.
- Go to Mail | Layout | Link preview.
- Disable the Preview links in email option, and click Save.
- Go to the community site and perform a password reset.
- After receiving the email, open it and click the link. It should work correctly.
Please note: Users using other email clients or third-party scanners (including Outlook if the above solution does not work) will need to reach out to the provider of the software to address the issue as we are not able to provide support for third-party software.
Option 2: Clear the Cache and Cookies from your browser.
[1] “Knowledge Article 000269112”.
'Log in to Community as User' button doesn't show up for certain users
- Associate a Contact to a Related User.
- Navigate to Setup search for Digital Experiences (formerly All Communities), and click All Sites.
- Select Workspaces for the Community to which the user needs access.
- Click Administration, then Members.
- Under Available Profiles, select the profile assigned to your User and click the Add button.
- Save your changes.
New users can't create a new password
When the Forgot Password page is looping, this is typically caused by email clients (specifically Outlook, Yahoo, and occasionally Gmail), which preview the forgot password link and, therefore cause it to expire before the student can use it. Users can go to the Settings of their email client and ensure that Preview Links is turned off.
You can also update the Password Policies setting in the User Profile:
- Navigate to the Profile of the user experiencing the problem.
- Scroll down to the Password Policies section of the profile.
- You'll see an option labeled Don't Immediately Expire links in forgot password emails.
- Check this box.
- Save your changes.
Community User is related to the wrong Contact record
See Correcting a Community User that is related to the wrong Contact record.
For details on viewing Console errors, see Troubleshooting using Console Mode.