We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Updating a module.

Development and Programming

Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham

When does the update() method in upd.my_module.php actually get called?

From what I can tell:

  • Modules are not updated when you view the module index.
  • Modules are updated if you view their CP backend.

Is there are workaround for modules that do not have a cp backend?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham

To test this:

  1. open the jQuery module and change the version number to 1.1.
  2. return true in the update method
  3. Visit the module index
       
Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham

meep.

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
15 years ago
Bjørn Børresen's avatar Bjørn Børresen

I think you’re right, to update a module you need to access the module page. So I guess if you need this functionality you’ll have to provide a backend as well with a big green UPDATE button on it.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
15 years ago
Leevi Graham's avatar Leevi Graham

That would be a bit stinky. I personally think that they should be updated on the module index page. Even better would be to have an alert that a module is ready to update…. Maybe I could add that to NSM Addon Updater…. thinking

       
Bjørn Børresen's avatar
Bjørn Børresen
629 posts
15 years ago
Bjørn Børresen's avatar Bjørn Børresen

I personally don’t like the idea of modules doing updates without my knowledge. The Discussion Forum Module from EllisLab will do that; update silently the first time you visit it’s control panel after uploading new files. How do you know it’s updated? You don’t. SolSpace Tags for instance will disable itself (you get a big error message) and then force you to visit the CP and click the big update button there. That’s better IMO.

But yeah, I agree, best of all would be to display an update status on the module index page. Or even better, “Update available” and then being able to just hit update and have it download and update the module.

It would be great if this functionality (NSM Addon Updater?) was bundled in, and then could contact Devot-EE or something to retrieve the latest module info / download. Of course one would have some challanges with downloading/auto-uptdating commercial modules but nothing that couldn’t be solved.

       
Low's avatar
Low
407 posts
15 years ago
Low's avatar Low

Personally, I kinda like the silent update idea. Although an indication on the Modules page that the module is ready for an update would be nice, I guess.

       
Rob Sanchez's avatar
Rob Sanchez
335 posts
15 years ago
Rob Sanchez's avatar Rob Sanchez

Shouldn’t be to difficult to make an extension or accessory that does this, no?

       
ender's avatar
ender
1,644 posts
15 years ago
ender's avatar ender

for what its worth it doesn’t appear to be possible to update a fieldtype (although they have install/uninstall methods of their own). I could make it a module but it’s a similar kludge to the situation mentioned here of needing to have a module CP backend in order to update a module.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.