I
I
ipokos2017-01-25 03:33:18
Magento
ipokos, 2017-01-25 03:33:18

Why do I get Warning include(Mage...) in Magento(1.9.3.1) when I use my model?

In module config:

<models>
        <module>
            <class>Packege_Module_Model</class>
            <resourceModel>module_resource</resourceModel>
        </module>
    </models>

In the controller I take the model: Mage::getModel('')
Regardless of the text, the error is the same.
I get an error:
Warning: include(Mage\Module\Model\...
i.e. as I understand it, it does not include a custom namespace.
Tell me where to look, I didn’t have to work with Magento ((
app/code/local/.. ./module/etc/config.xml
<config>
    <modules>
        <Working_Weblog>
            <version>0.1.0</version>
        </Working_Weblog>
    </modules>
    <frontend>
    <routers>
        <weblog>
            <use>standard</use>
            <args>
                <module>Working_Weblog</module>
                <frontName>weblog</frontName>
            </args>
        </weblog>
    </routers>
</frontend>
<global>
    <models>
        <weblog>
            <class>Working_Weblog_Model</class>
            <resourceModel>weblog_resource</resourceModel>
        </weblog>
    </models>
</global>
</config>

app/etc/modules
<config>
    <modules>
        <Working_Weblog>
            <active>true</active>
            <codePool>local</codePool>
        </Working_Weblog>
    </modules>
</config>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2017-01-25
@khrisanfov

You wrote the path to the file "app/code/local/.../module/etc/config.xml" is wrong.
Check the paths are correct or not.
The model must be in
the model get code. The model
class name must be Working_Weblog_Model_Modelname

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question