Updating Core Plugins
Posted: Tue May 26, 2009 2:13 pm
I found a problem with updating core plugins. Normal plugins shipped via Spartacus do have an update function, that is executed after the update of a plugin. Core Plugins are updated manually by uploading/installing the files on the web server.
I upgraded my S9Y installation to 1.5 Alpha. The core plugin static_pages is part of this and was upgraded by uploading, too. Looking into the code of the plugin I found an important update function, that was never executed on my system.
I think, it would be worth thinking about, how to get an automated update mechanism on the core plugins, too. Perhaps an enhancement inside the pluigin library, making it possible to mark some plugins as "core" or something. These plugins should remember their version number in a hidden config entry, and if a change of version is detected, the update functionality of the plugin should be called. Perhaps while entering the plugin's config screen the first time or better inside the S9Y update routine, that should scan all delivered core plugins and call the update functions after upgrading the s9y database and stuff. Perhaps no "hidden config entry" is needed. The s9y upgrade mechanism should call *all* update functions of plugins where a change of version is detected after upgrading serendipity itself (normally these plugins *are* the core plugins only).
Is there already such a kind of upgrading mechanism and the static_page plugin simply was not linked into it?
I upgraded my S9Y installation to 1.5 Alpha. The core plugin static_pages is part of this and was upgraded by uploading, too. Looking into the code of the plugin I found an important update function, that was never executed on my system.
I think, it would be worth thinking about, how to get an automated update mechanism on the core plugins, too. Perhaps an enhancement inside the pluigin library, making it possible to mark some plugins as "core" or something. These plugins should remember their version number in a hidden config entry, and if a change of version is detected, the update functionality of the plugin should be called. Perhaps while entering the plugin's config screen the first time or better inside the S9Y update routine, that should scan all delivered core plugins and call the update functions after upgrading the s9y database and stuff. Perhaps no "hidden config entry" is needed. The s9y upgrade mechanism should call *all* update functions of plugins where a change of version is detected after upgrading serendipity itself (normally these plugins *are* the core plugins only).
Is there already such a kind of upgrading mechanism and the static_page plugin simply was not linked into it?