Question

The time I am coming to onepage checkout, I am getting a critical error

CRIT (2): Not valid template file:frontend/base/default/template/aitcommonfiles/design--frontend--base--default--template--checkout--onepage--shipping_method.phtml

Because of this issue, customers are not being able to move to onepage checkout step 'shipping methods' from billing or shipping address.

Can anyone address the possible ways to handle this issue?

NOTE: I am using Magento v1.9.2.1.

Was it helpful?

Solution

A common cause of this error is the use of symlinks without enabling this in the admin area…

System > configuration > developer > Template Settings 

The error gets triggered in app\code\core\Mage\Core\Block\Template.php around line 243 ( see here ) - so if its not an issue with symlinks then this would be a good place to start debugging.

If you are not using xDebug then where the exception gets caught around line 250 you should either log or var_dump the values of:

$includeFilePath

and

$this->_viewDir

Then make sure they both exist (paying attention to the case)

Failing that you might want to look at permissions.

I suspect you have a third party module installed acting as a aitcommonfiles and as the error suggests the template file design--frontend--base--default--template--checkout--onepage--shipping_method.phtml does not exist in the location app/design/frontend/base/default/template/aitcommonfiles/.

This is a third party module I would re-install it, or find the missing template file and put it in the correct location, or contact the module provider for assistance.

OTHER TIPS

After following many posts, this one played a trick:

https://stackoverflow.com/questions/12110389/magento-not-valid-template-file-page-1column-phtml/12115511#12115511

Approach I followed:

At line no. 250, I just logged $includeFilePath and $this->_viewDir for both the case, working live site and non-working staging site.

Observation:
working site logged: /var/ait_patch/design/frontend/base/default/template/aitcommonfiles/design--frontend--base--default--template--checkout--onepage--shipping_method.phtml

whereas non-working-site logged nothing inplace.
So, I looked into the directory if the file present or not and found that under the directory var/, this file was missing /var/ait_patch/design/frontend/base/default/template/aitcommonfiles/design--frontend--base--default--template--checkout--onepage--shipping_method.phtml
and adding that file by copying from a working site played the trick.

This was a headbaning as because it was hard to predict that any third party extension can place some files under var/ directory.

Thanks @Rohit got your effortless help!

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top