0

REWRITE: Ok rewriting this to make it clearer.

I have created a custom module using this (http://www.silksoftware.com/magento-module-creator/). It works fine however I needed to expand the module after i created it.

I went into my database, went into this modules custom database table, added the required entries and then from this generated the create SQL, I went into the module and added in 2 more text fields that were required, updated the database create in the install to reflect the new structure, uploaded it and cleared the cache. However it did not update the admin side.

I then recreated the module in the tool linked above, as an update with the new SQL I just generated as an update, with the new fields. and uploaded this (note this has worked repeatedly for me before on my other modules). Uploaded this and cleared the cache like I usually would and it did not work once again.

I then tried again with the tool with a much higher version number just to see if this would force the update, it did not work.

I then started faffing about, deleting the core_resource row, clearing the cache, deleting the VAR folder, uninstalling the module then re installing it from a base 0.1.0 with the new fields.

However no matter what I do once I pop the module files back onto my site the site just remembers the old structure and shows me that.

I also tried disabling the module before deleting and clearing the cache, then when re installed the module is re installed as disabled. so it's not being fully removed.

  • "So I added the fields in the database, recreated the module with the creator" Why? If it's a flat entity, there's nothing to change except possibly the grid and edit forms. Did you manually delete the table schema cache (it won't be removed by normal cache clear)? – benmarks Mar 27 '13 at 12:15
  • Just adding the fields into my original code didn't work so i just recreated the module again through the site i linked (so essentially doing what i just did but knowing it would work and it wasn't some typo from me). I have however since cleared the cache after doing every stage to make sure it's cleared with no luck. – Chris Morris Mar 27 '13 at 14:49
  • The information, which update scripts ran in your magento are stored in core_resource table. If you want to install your tables again or run a update script again, change the version in this table. – Fabian Blechschmidt Apr 7 '13 at 1:04
1

Reset the version back to 0.1.0 in the config.xml, then delete the entry for the module in core_resource table in the database and refresh the frontend of your site.

The core_resource table in the database holds all information and current versions for installed extensions. Removing entries from here will then look to install the extension a-fresh from the first version again providing the extension and SQL files are packaged correctly.

It would be recommended to disable cache in the back office while you are working on any development as well.

  • This didn't work tried it 3 times, last time i also deleted all the files for the module as well, cleared cache and index, deleted the core_resource entry and then re-installed, still didn't work. Though i should specify this is a admin module only, no front end (front end is handled by another module) – Chris Morris Mar 27 '13 at 11:50
  • Sounds like it set up / packaged incorrectly if you're not seeing any change in the back office then. – zigojacko Mar 27 '13 at 11:57
  • Which is weird because I've made dozens of modules with this module creator and updates have always worked (though some required extra cache clearing...) – Chris Morris Mar 27 '13 at 11:59
  • As it has become a bit of a mess due to the version changes / SQL updates - I would just revert everything and start again. Fresh version number, no references in database, clean package after complete removal and start again. – zigojacko Mar 27 '13 at 12:01
  • I've tried to do a fresh install of my module, but magneto being the pain in the arse that it is hides everything away, i can;t find everything referring to my module and having previously looked online failed to find a way to do so. – Chris Morris Mar 27 '13 at 12:11

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.