Update pre-production site [application/blocks/ overrides not working] [SOLVED]

Permalink
Hello!

I'm not sure what can be going wrong and I hope someone can help because I can't find anything on the web similar to what I am experiencing.

I've built a Concrete5 site (v5.7.4.2) on my local machine... nothing special, a basic theme and a few custom block templates... Works like a charm (on my local machine!).

Now getting the site to work on a pre-production system is giving me a slight **headache**.

Using [this](https://www.concrete5.org/documentation/developers/5.7/installation/moving-a-site/) as a guide the site's home page loads as expected... :-)

However, when trying to load a page that contains a block template located in /application/blocks/<block>/templates/..., I get an error:
include(/opt/bitnami/apps/concrete5/htdocs/concrete/blocks/autonav/templates/breadcrumbs/view.php): failed to open stream: No such file or directory


OK let's see: on my local machine C5 environment :
# concrete5 Version
Core Version - 5.7.4.2
Version Installed - 5.7.4.2
Database Version - 20150504000000
# concrete5 Packages
Block Designer (1.0.2), Epona (1.0), Thumb Gallery (1.0.3).
# concrete5 Overrides
blocks/external_form/form/controller/subscribe_form.php, blocks/external_form/form/controller, blocks/external_form/form/subscribe_form.php, blocks/external_form/form, blocks/external_form, blocks/topic_list/templates/full_width_flat/view.css, blocks/topic_list/templates/full_width_flat/view.php, blocks/topic_list/templates/full_width_flat, blocks/topic_list/templates/sidebar_list/view.php, blocks/topic_list/templates/sidebar_list, blocks/topic_list/templates, blocks/topic_list, blocks/autonav/templates/left-nav/view.php, blocks/autonav/templates/left-nav, blocks/autonav/templates/breadcrumbs/view.php, blocks/autonav/templates/breadcrumbs, blocks/autonav/templates, blocks/autonav, blocks/page_list/templates/recent_posts_home/view.php, blocks/page_list/templates/recent_posts_home, blocks/page_list/templates/footer_recent_posts/view.php, blocks/page_list/templates/footer_recent_posts, blocks/page_list/templates/recent_posts_widget/view.php, blocks/page_list/templates/recent_posts_widget, blocks/page_list/templates/main_blog_page/view.css, blocks/page_list/templates/main_blog_page/view.php, blocks/page_list/templates/main_blog_page, blocks/page_list/templates/community_posts_home/view.php, blocks/page_list/templates/community_posts_home, blocks/page_list/templates, blocks/page_list, blocks/external_form/form/controller/subscribe_form.php, blocks/external_form/form/controller, blocks/external_form/form/subscribe_form.php, blocks/external_form/form, blocks/external_form, blocks/topic_list/templates/full_width_flat/view.css, blocks/topic_list/templates/full_width_flat/view.php, blocks/topic_list/templates/full_width_flat, blocks/topic_list/templates/sidebar_list/view.php, blocks/topic_list/templates/sidebar_list, blocks/topic_list/templates, blocks/topic_list, blocks/autonav/templates/left-nav/view.php, blocks/autonav/templates/left-nav, blocks/autonav/templates/breadcrumbs/view.php, blocks/autonav/templates/breadcrumbs, blocks/autonav/templates, blocks/autonav, blocks/page_list/templates/recent_posts_home/view.php, blocks/page_list/templates/recent_posts_home, blocks/page_list/templates/footer_recent_posts/view.php, blocks/page_list/templates/footer_recent_posts, blocks/page_list/templates/recent_posts_widget/view.php, blocks/page_list/templates/recent_posts_widget, blocks/page_list/templates/main_blog_page/view.css, blocks/page_list/templates/main_blog_page/view.php, blocks/page_list/templates/main_blog_page, blocks/page_list/templates/community_posts_home/view.php, blocks/page_list/templates/community_posts_home, blocks/page_list/templates, blocks/page_list
# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Only when manually removed or the cache is cleared.
# Server Software
Apache/2.4.10 (Debian)


On the pre-production server:
# concrete5 Version
Core Version - 5.7.4.2
Version Installed - 5.7.4.2
Database Version - 20150504000000
# concrete5 Packages
Block Designer (1.0.2), Epona (1.0), Thumb Gallery (1.0.3).
# concrete5 Overrides
/opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/footer_recent_posts/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/footer_recent_posts, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page/view.css, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_widget/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_widget, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/community_posts_home/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/community_posts_home, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_home/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_home, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/left-nav/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/left-nav, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/sidebar_list/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/sidebar_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat/view.css, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/subscribe_form.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/controller/subscribe_form.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/controller, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/footer_recent_posts/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/footer_recent_posts, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page/view.css, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/main_blog_page, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_widget/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_widget, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/community_posts_home/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/community_posts_home, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_home/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates/recent_posts_home, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/page_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/left-nav/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/left-nav, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/sidebar_list/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/sidebar_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat/view.css, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat/view.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates/full_width_flat, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list/templates, /opt/bitnami/apps/concrete5/htdocs/application/blocks/topic_list, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/subscribe_form.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/controller/subscribe_form.php, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form/controller, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form/form, /opt/bitnami/apps/concrete5/htdocs/application/blocks/external_form
# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache


The file is clearly in its "override" location:
~$ ls /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php && echo "ok"
/opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php
ok


Am I missing something?

I've cleared the cache, and set all cache settings to OFF,
File permissions look good
$ ls -al /opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php       
total 16K
drwxr-xr-x 2 bitnami daemon 4.0K Jun 15 18:20 .
drwxr-xr-x 4 bitnami daemon 4.0K Jun 15 20:04 ..
-rw-r--r-- 1 bitnami daemon 5.4K Jun 15 18:20 view.php


Can anyone give me some troubleshooting tips so I can avoid this quagmire in the future.

thanks in advance.

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi sthaigh,

In the pre-production server environment, there appears to be two breadcrumbs templates. I don't see breadcrumbs.php in the local environment. Maybe there is a conflict between which template to use.
/opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs/view.php
/opt/bitnami/apps/concrete5/htdocs/application/blocks/autonav/templates/breadcrumbs.php
sthaigh replied on at Permalink Reply
Good catch... sometimes one needs an extra set of eyes! However I can't explain why this is. Anyway...

I happened to come across a this post which solved my issue:
https://www.concrete5.org/community/forums/5-7-discussion/5.7-blockt...

So I replaced this
$nav = BlockType::getByHandle('autonav');
$nav->controller->orderBy = 'display_asc';
$nav->controller->displayPages = 'top';
$nav->controller->displaySubPages = 'relevant_breadcrumb';
$nav->controller->displaySubPageLevels = 'enough';
$nav->controller->blockViewRenderOverride = 'templates/breadcrumbs/view';
$nav->render();

with a standard Concrete5 area block in my page template...

Happy Camper!