import _self throwing ElementCriteriaModel could not be converted to string {% import _self as mcr_home %}

is throwing


  Object of class Craft\ElementCriteriaModel could not be converted to string


How is this possible and how do I fix it?
In short, those two have nothing to do with each other. What's more likely is that the error is being triggered by the imported script. It's possible that your stack trace is just giving you a red herring by pointing to the import itself.



In your Twig code:

import pulls in a macro (or macros).

_self just means "this template file".

"mcr_home" is just how you're referring to your imported macro(s).

In the error message:

An ElementCriteriaModel is simply a model representing a Craft content search.

"could not be converted to string" is telling you that the model cannot be read as a string.



Obviously there is no correlation there. Take a closer look at the macro(s) you are importing... I'm certain you will find an ElementCriteriaModel which is attempting to be used as a string.