A word of caution about overriding block templates
Permalink
I developed a few sites recently that had the strange behaviour where the home page was slightly slower than the rest of the pages, without any obvious reason. It felt as if the home page was doing twice the amount of processing.
I noticed that it occurred on some sites where I had overridden the template for a block, in particular the search block. Concrete5 was including a link to view.css from within my override folder, even when the file didn't exist.
This was hard to spot as concrete5 has a bug where in some cases it doesn't return the proper 404 error code for the page not found page (I think this is fixed in github, but seehttp://www.concrete5.org/developers/bugs/5-4-2-1/404-error-pages-do... for a fix).
So why the word of caution? If files are not found, concrete5 generates a 404 page, meaning it has to do all the work it would normally do to generate a page. So the initial page request ends up triggering another full page request for every file it can't find. The reason it felt like the home page was doing twice the processing was because it WAS doing twice the processing.
An easy solution for this is to simply create a view.css file for your block override, even if it is empty. I'm not sure if it is particular blocks or all built in blocks, but it's definitely something to look out for.
I think this behaviour has been fixed in github, but this would still be a potential issue for the current release.
I noticed that it occurred on some sites where I had overridden the template for a block, in particular the search block. Concrete5 was including a link to view.css from within my override folder, even when the file didn't exist.
This was hard to spot as concrete5 has a bug where in some cases it doesn't return the proper 404 error code for the page not found page (I think this is fixed in github, but seehttp://www.concrete5.org/developers/bugs/5-4-2-1/404-error-pages-do... for a fix).
So why the word of caution? If files are not found, concrete5 generates a 404 page, meaning it has to do all the work it would normally do to generate a page. So the initial page request ends up triggering another full page request for every file it can't find. The reason it felt like the home page was doing twice the processing was because it WAS doing twice the processing.
An easy solution for this is to simply create a view.css file for your block override, even if it is empty. I'm not sure if it is particular blocks or all built in blocks, but it's definitely something to look out for.
I think this behaviour has been fixed in github, but this would still be a potential issue for the current release.