2

I am trying to activate a new module in Magento 1. Here are my actions step-by-step:

  1. I created a new file in /app/etc/modules, called : Mage_ContactMessage.xml : enter image description here

  2. I created a new folder in /app/code/core/Mage, called ContactMessage : with 2 folders : /etc & /sql

  3. The file config.xml in /etc : enter image description here

  4. The file install-1.6.0.0.php from /sql/contactmessage_setup : enter image description here

The table is not being created, and I don't understand why. Please help me

10
  • Can you add your table name instead of contactmessage/stock? – Sukumar Gorai Jun 27 '18 at 14:51
  • I tried like this : $installer->getTable('contactmessage_stock') and the same problem – klsdskldsd Jun 27 '18 at 14:56
  • Remove the entry from core_resource table for your module then try. – Sukumar Gorai Jun 27 '18 at 14:57
  • Sorry I don't understand, which entry ? – klsdskldsd Jun 27 '18 at 14:59
  • Can you goto the table core_resource? Open that table, you will find a row contactmessage_setup with version. Delete that entry and try again. – Sukumar Gorai Jun 27 '18 at 15:01
1

Upload the module to

app/code/local/Mage/ContactMessage

instead of

app/code/core/Mage/ContactMessage

Because you have mentioned the codepool to local.

Or you can modify the codepool to core. But this is not a best practice.

13
  • I can't do that, because the project exist, maybe modify codepool to core ? – klsdskldsd Jun 27 '18 at 15:16
  • Yes either you can try to modify it to core. – Sukumar Gorai Jun 27 '18 at 15:16
  • And normally the creation of table should be done on refresh of doesn't matter which page from project right ? – klsdskldsd Jun 27 '18 at 15:17
  • Yes whenever you refresh the page installer will run but make sure cache is not enabled otherwise you need to refresh the cache as well. – Sukumar Gorai Jun 27 '18 at 15:18
  • The same problem... – klsdskldsd Jun 27 '18 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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