2

Warning: include(C:\xampp\htdocs\magento\includes\src\Magentotutorial_Weblog_Model_Blogpost.php): failed to open stream: No such file or directory in C:\xampp\htdocs\magento\includes\src\Varien_Autoload.php on line 93


config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Magentotutorial_Weblog>
            <version>1.6.0.4</version>
        </Magentotutorial_Weblog>
    </modules>

    <global>
     <models>
        <weblog>
            <class>Magentotutorial_Weblog_Model</class>
            <resourceModel>weblog_resource</resourceModel>
        </weblog>
     </models>
    </global> 

    <frontend>
      <routers>
          <weblog>
            <use>standard</use>
               <args>
                  <module>Magentotutorial_Weblog</module>
                  <frontName>weblog</frontName>
               </args>
          </weblog>
      </routers>
    </frontend> 
</config>

Controllers: IndexControllers

<?php 
class Magentotutorial_Weblog_IndexController extends Mage_Core_Controller_Front_Action {
    public function testModelAction() {
        $blogpost = Mage::getModel('weblog/blogpost');
        echo get_class($blogpost);
    }
} 
?>

I have also create the Model file named BlogPost. Please find the code as below.

<?php 
class Magentotutorial_Weblog_Model_Blogpost extends Mage_Core_Model_Abstract
{
    protected function _construct()
    {
        $this->_init('weblog/blogpost');
    }
} 
?>
3
  • please disable compilation from admin sytem->tools->compilation
    – Shivam
    Mar 11, 2014 at 6:59
  • Thank you Shivam.. I got an answer !! Mar 11, 2014 at 7:06
  • Please add your comment as answer .. Mar 11, 2014 at 7:07

1 Answer 1

1

Please disable compilation from admin using following step,

sytem->tools->compilation
3
  • Hi Shivam, could you please help me in magento block. stackoverflow.com/questions/22402146/… Mar 14, 2014 at 10:27
  • "disable compilation"? Why? Is it hack?
    – Cherven
    Apr 7, 2014 at 21:43
  • compilation is enable for performance so it store all the class in magento\includes\src\ directory.
    – Shivam
    Apr 8, 2014 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.