UrlRewriter redirects to maintenance page when attempting to access a public knowledge article
Apex , Knowledge , Communities
Last updated 13 days ago ·Reference W-8975673 ·Reported By 3 users
In Review
Summary
When using a UrlRewriter class with a community that has public knowledge articles, attempting to access the knowledge article redirects to the maintenance page.
Expected Results:
Knowledge article is displayed or the user is redirected to the specific page set in the UrlRewriter.
Actual Results:
User is redirected to the maintenance page.
Repro
1) Create UrlRewriter class : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_site_urlRewriter.htm. Follow the example class and return null for the overriding methods
2) Enable and create Knowledge for community(https://trailhead.salesforce.com/en/content/learn/v/projects/build-a-community-with-knowledge-and-chat/enable-and-configure-lightning-knowledge)
3) Create a community
4) Open Public Access Settings(Setup --> Sites --> ) for community and provide read access on Knowledge object
5) Open the Knowledge article inside community as a guest user and authenticated user
a. We should be able to see the Knowledge Article successfully
6) Add the URLRewriter class to the Community
a. Go to setup
b. Search for Sites
c. Click on your community label
d. Edit
e. Choose the URL Rewriter Class which we've created above (Step 1)
7) Now perform the step 5
a. For authenticated user, it'll load successfully
b. For Guest user, it will redirect to maintenance page.
Workaround
- No workaround at this time.
Reported By (3)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.
