Issue
When accessing a page with a valid friendly URL (e.g. /web/portal/manage-users), an unexpected redirection occurs to another URL (e.g. /web/portal/manage-users-a). The unintended page and its redirect configuration cannot be found in the Site Pages UI, the Friendly URL History, or the Redirects administration panel.
Environment
- Liferay DXP 7.4
- Quarterly Releases
Resolution
To resolve this issue, follow these troubleshooting steps:
1. Standard UI Checks
First, verify that the redirect is not configured in the user interface:
- Incognito Window: Test the page access in a private or incognito browser window to rule out caching issues.
- Friendly URL History: Navigate to Site Builder → Pages, find the intended page, click the Actions menu (⋮), and select Configure. Check the Friendly URL History to see if the incorrect URL is listed and can be removed.
- Alias Redirects: Go to Control Panel → Configuration → Redirects and search for any redirect rules that could be causing the issue.
2. Check Logs
If the UI checks do not reveal the source of the redirect, check for any related errors in the logs when the redirection occurs:
- Check the Liferay DXP logs for any error messages or warnings.
- Check the browser's developer console for any client-side errors.
3. Database Investigation
If the previous steps do not resolve the issue, inspect the database for an orphaned layout entry.
-
Run the following SQL query against your Liferay database, replacing '/your-incorrect-url' with the friendly URL you are being redirected to:
SELECT * FROM Layout WHERE friendlyURL = '/your-incorrect-url';
- If the query returns a result, it indicates an orphaned page record.
- Remove this record from the Layout table to stop the unintended redirection.
NOTE: Be sure to take a backup of your database prior to making any changes. Always test the changes in a lower environment before making changes in production.
Making manual changes to the database is not recommended, and should be carefully assessed based on your own business needs and risk factors. Any such operation is performed at the sole discretion of your own team.