1

first step disabled the cache... done...

below is my file hierarchy:

enter image description here

this is my config.xml at app/code/community/Foggyline/HappyHour/etc/config.xml

<?xml version="1.0"?>
 <config>
<modules>
    <Foggyline_HappyHour>
        <version>1.0.0.0</version>
    </Foggyline_HappyHour>
</modules>
<frontend>
    <routers>
        <foggyline_happyhour>
            <use>standard</use>
            <args>
                <module>Foggyline_HappyHour</module>
                <frontName>happyhour</frontName>
            </args>
        </foggyline_happyhour>
    </routers>
</frontend>
<global>
    <blocks>
        <foggyline_happyhour>
            <class>Foggyline_HappyHour_Block</class>
        </foggyline_happyhour>
    </blocks>
    <models>
        <foggyline_happyhour>
            <class>Foggyline_HappyHour_Model</class>
            <resourceModel>foggyline_happyhour_resource</resourceModel>
        </foggyline_happyhour>
        <foggyline_happyhour_resource>
            <class>Foggyline_HappyHour_Model_Resource</class>
            <entities>
                <user>
                    <table>foggyline_happyhour_user</table>
                </user>
            </entities>
        </foggyline_happyhour_resource>
    </models>
    <resources>
        <foggyline_happyhour_setup>
            <setup>
                <model>Foggyline_HappyHour</model>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
            <foggyline_happyhour_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </foggyline_happyhour_write>
            <foggyline_happyhour_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </foggyline_happyhour_read>
        </foggyline_happyhour_setup>
    </resources>
</global>
</config>

and my install script at app/code/community/Foggyline/HappyHour/sql/foggyline_happyhour_setup/install-1.0.0.0.php

and also tried renaming the install-1.0.0.0.php to mysql4-install-1.0.0.0.php but not woring..

 /* @var $installer Mage_Core_Model_Resource_Setup */

  $installer = $this;
  $installer->startSetup();
  $table = $installer->getConnection()
    ->newTable($installer->getTable('foggyline_happyhour/user'))
    ->addColumn('user_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'identify' => true,
        'unsigned' => true,
        'nullable' => false,
        'primary' => true)
            , 'Id')
    ->addColumn('first_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
        'nullable' => false
            )
            , 'First Name')
    ->addColumn('last_name', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
        'nullable' => false
            )
            , 'Last Name')
    ->setComment('Foggyline_HappyHour User Entity');

 $installer->getConnection()->createTable($table);
 $installer->endSetup();

now when i refesh my store or visit any page of my store.. nothing is getting into mysql.. the core_resource table does not have any entry as foggyline_happyhour_setup with version 1.0.0.0 , i also tried clearing cache /var/cache any help or suggestion would be a great help thanks in advance...

i am new to magento.. and still learning it.. so that i could become a magento developer...

4 Answers 4

2

Please add read and write permission for resource.

<resources>
<foggyline_happyhour_setup>
        <setup>
            <module>Foggyline_HappyHour</module>
        </setup>
        <connection>
            <use>core_setup</use>
        </connection>
</foggyline_happyhour_setup>
<foggyline_happyhour_write>
        <connection>
            <use>core_write</use>
        </connection>
</foggyline_happyhour_write>
<foggyline_happyhour_read>
    <connection>
        <use>core_read</use>
    </connection>
</foggyline_happyhour_read> 

Now you need to remove resource entry from core_resource and then remove cache and try to check.

Sign up to request clarification or add additional context in comments.

5 Comments

already added.. but not updated the question.. now i am updating.. and core_resource table does not get affected with any entry..so deleting is not in case... please see the updated config.xml and anyother idea.. why this is not working.. not even resource entry is found...
<setup> <model>Foggyline_HappyHour</model> </setup> should be <setup><module>Foggyline_HappyHour</module></setup>
tried replacing model to module.. but again no entry was found in core_resource table.. and not table is getting created foggyline_happyhour_user...
thanks it is working now.. by changing the model to module.. when you have commented it to use module instead of model.. i tried but with a typo mistakes.. as moduel.. now i change it to module.. it is working as aspected.. thank you very much sir..
1

Check that you dont have the node <skip_process_modules_updates>1</skip_process_modules_updates> in your local.xml

1 Comment

It prevents Magento from running the install scripts on first surf to the website.
1

Had this problem too

2016-03-14T19:50:08+00:00 ERR (3): Warning: simplexml_load_string(): resourceModel&gt;

Had a newline in the config.xml after

</resourceModel

So, check everything for spaces and newlines. And... Enable magento logs and verbose errors on index.php.

Another thing. When you remove the core_resource table entry, be sure to delete foggyline_happyhour_user too... If not you will get a There has been an error processing your request.

Comments

0

Please change <model>Foggyline_HappyHour</model> to <module>Foggyline_HappyHour</module>. Their documentation is also wrong.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.