Bug #18665
closedThe child pages of Mount points (do not substitute mount point) are not linked correctly in menus
0%
Description
If you have a mount point that doesn't have "substitute mount point" set, the links to the child pages are missing the final parameter.
This is because the menu code passed only the required parameter -- the current page ID. In theory this means that the other parameters are calculated. Specifically, the first page ID for the mount point is retrieved from the pageRec and the pageRec is loaded from the database. However, there is a cache of the data which is used to avoid further lookups. The key for this is the current page and the first page ID of the mount point. If the first page ID wasn't passed in it is blindly extracted from the pageRec but there has been no check to see if pageRec exists -- this check occurs after the cache lookup.
The first page ID is only set/checked this once and is then appended to the MP Vars.
Net result: If the first page ID isn't passed in AND the pageRec isn't passed in then the MP Vars is missing the final parameter and the Mount Point link is broken.
The patch moves the check for pageRec's existence to before the assignment of the first page of the mount point.
(issue imported from #M8194)
Files