Sitecore and Coveo: The Layout Was Not Found Error? You Can Fix It In Under 4 Seconds

Yeah, I know what you are thinking. “What the hell is going on?!”. You are 100% sure that you are doing everything right and still you keep receiving that error message: The layout for the requested document was not found when opening your Coveo search page. I know that feeling and indeed, it can be very frustrating. But don’t worry, I’m here to help you keep your sanity. Actually, I have two good news for you: It’s not your fault and it will take only 4 seconds to fix it.



Do you have these Symptoms?

Let’s start by making sure we are talking about the same issue. Can you confirm that you have your Coveo for Sitecore package installed and configured? If you do, then I suppose that you have created a Coveo search page item, right? Are you able to open it on your Experience Editor? You should, otherwise, we are not on the same page. Next, you need to confirm that you have published your entire website after installing the Coveo for Sitecore package, deal? Good, that’s good. If even after doing all these steps you still get this error message when you open your published Coveo search page, stay calm and keep reading this article.



Troubleshooting the error

Not that complicated, you may think. If the published item has no layout, maybe there was an issue during the search page creation and my search page on master does not have a layout as well. Let’s double check that in the presentation details:


Well, that’s weird. Maybe it was an issue during the publish. Let’s do that again and double check the published item on the content editor by changing the current database to web.


Yeah, I know.



The Diagnosis

Now your levels of cortisol are rising really fast. Your item is correct on master, you have published it twice and still, they are different on each database. How can that be possible? Unfortunately, I’ll have to inform you that it is simply Sitecore playing tricks on you. After a lot of investigation on my side, the final conclusion is that it is a CACHE issue. Yeah, that simple. Isn’t that funny?



The Treatment

Maybe you don’t know that, but there is a way you can clear completely every Sitecore related cache.


Start by clicking on the Refresh button and you should get something like this:


Then click on Clear all and everything should come back to normal again. If you try to open your published Coveo search interface the weird error message should be gone.

Yeah buddy, as you can see, sometimes it is really not your fault. Who knows about the next time… See you on the next post!





2 thoughts on “Sitecore and Coveo: The Layout Was Not Found Error? You Can Fix It In Under 4 Seconds

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s