This is a summary of an issue we have had with publishing pages not being indexed, and then unable to build the search-driven pages we wanted using for example Content Search Web Part. This occured in SharePoint Online (Office 365) and we have only had this issue with a couple of tenants. So my guess is that most tenants are working fine, but if you should come across this strange behavior, I hope this post can help you save some time.
- Created a Publishing Site
- Added a Content Type and a Page Layout, created a few test articles
- Added a Content Search Web Part and set up a query to return articles for the Content Type created above
- Waited a long time (normal)
- No results (oops)
- Tried to reindex the library (curious)
- No results (worried)
- Retried all the steps (scared)
- No results (desperate)
- Got coffee (calm)
- No results (called support)
I guess you get it. Something was very wrong and I was stuck on not getting any results back. On-Premises this would probable been one of those situations a full crawl, or at worst a index reset, had fixed it. But running in Office 365 we don’t have these abilities.
After some trial and error I understood what was causing the issue, and got this workaround:
- Go to “Site Settings”
- Select “Navigation” under “Look and feel”
- Uncheck these options:
- Add new pages to navigation automatically
- Create friendly URLs for new pages automatically
All pages created and published after making this change was indexed and showed up as expected. Unfortunately all the pages created before doing this change was a lost cause. Believe me, I tried a lot but unable to get them indexed.
As being on Office 365 this issue was addressed with Microsoft Support, and after a while they released a fix.
Unfortunately I suspect this error can still occur in some scenarios, and to make sure we don’t run into this trouble again, a recommendation is to avoid using the Managed Navigation set up as shown above just to be safe.