Problem with deleted sections
Just found a problem in the code.
If you have any deleted sections in the site then the current code builds them into the menu system.
it needs an additional condition ( AND [Status]='N' ) in the function SectionList to check the value of Status.
So the code
should be changed to
Just found a problem in the code.
If you have any deleted sections in the site then the current code builds them into the menu system.
it needs an additional condition ( AND [Status]='N' ) in the function SectionList to check the value of Status.
So the code
Code:
if($respect==true) { $query = "SELECT [sPageName], [Section text], [nSectionID] FROM [Catalog Section] WHERE [nParentSectionID]=".$sectid." AND [bHideOnWebSite]=0 AND [bIncludeToSiteMap]=1 ORDER BY [Catalogue Section Sequence] ASC"; } else { $query = "SELECT [sPageName], [Section text], [nSectionID] FROM [Catalog Section] WHERE [nParentSectionID]=".$sectid." AND [bHideOnWebSite]=0 ORDER BY [Catalogue Section Sequence] ASC"; }
Code:
if($respect==true) { $query = "SELECT [sPageName], [Section text], [nSectionID] FROM [Catalog Section] WHERE [nParentSectionID]=".$sectid." AND [bHideOnWebSite]=0 AND [bIncludeToSiteMap]=1 AND [Status]='N' ORDER BY [Catalogue Section Sequence] ASC"; } else { $query = "SELECT [sPageName], [Section text], [nSectionID] FROM [Catalog Section] WHERE [nParentSectionID]=".$sectid." AND [bHideOnWebSite]=0 AND [Status]='N' ORDER BY [Catalogue Section Sequence] ASC"; }
Comment