When attempting to use the drop-down to see the page hierarchy for an existing Page type, customers may receive the following error:
Upon viewing the logs gathered from the Portals/_default/Logs folder, the following is shown:
Dnn.PersonaBar.UI.Services.TabsController - System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Dnn.PersonaBar.Library.Controllers.TabsController.GetDescendantsForTabs(IEnumerable`1 tabIds, IEnumerable`1 tabs, Int32 selectedTabId, Int32 portalId, String cultureCode, Boolean isMultiLanguage)
at Dnn.PersonaBar.Library.Controllers.TabsController.MarkSelectedTab(TabDto rootNode, Int32 selectedTabId, PortalInfo portalInfo, String cultureCode, Boolean isMultiLanguage, String validateTab)
at Dnn.PersonaBar.Library.Controllers.TabsController.GetPortalTabs(UserInfo userInfo, Int32 portalId, String cultureCode, Boolean isMultiLanguage, Boolean excludeAdminTabs, String roles, Boolean disabledNotSelectable, Int32 sortOrder, Int32 selectedTabId, String validateTab, Boolean includeHostPages, Boolean includeDisabled)
at Dnn.PersonaBar.UI.Services.TabsController.GetPortalTabs(Int32 portalId, String cultureCode, Boolean isMultiLanguage, Boolean excludeAdminTabs, String roles, Boolean disabledNotSelectable, Int32 sortOrder, Int32 selectedTabId, String validateTab, Boolean includeHostPages, Boolean includeDisabled)
In DNN, there are four page types that can be selected:
- Standard - this is a standard page with no unique characteristics.
- Existing - selecting this will redirect the page to an already existing page within your DNN instance.
- URL - this can be used to redirect to an external URL.
- File - this is used if you want the page to initiate the download of a certain file.
This above issue occurs because the existing type page was previously linked to a standard type page and the standard page was then converted to an existing page. You cannot have an existing page type linking to another existing page type.
Requirements: SuperUser access to DNN.
1. Log in to your DNN instance and go to Persona Bar > Settings > SQL Console.
2. Execute the following query to find the TabID for the existing page:
SELECT * FROM Tabs WHERE TabName = 'NAME_OF_EXISTING_PAGE'
NOTE: Make sure to enter the page name where indicated in the query.
3. Execute the following query to clear the page type:
UPDATE Tabs SET Url = NULL WHERE Tabid = TAB_ID_FROM_STEP_2
4. Clear your cache.
5. Go to Persona Bar > Content > Pages.
6. In the left page tree, click on the name of the existing page you modified.
7. In the page settings, select Existing.
8. Validate the fix by using the Existing Page drop down to select a new page.