Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Plugin Lifecycle Callback Troubleshooting
It seems my plugins do not always kick off the install procedures I expect them to when registering the proper plugin lifecycle callbacks. The latest being msd_article_image_colorpicker. Would someone be so kind as to take a look and tell me if I’m not doing something right?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Plugin Lifecycle Callback Troubleshooting
MattD wrote:
Help?
Code-wise you are doing everything correctly. What you are missing, are the plugin flags, which tell Textpattern if it needs to invoke the callbacks :-)
As you are using rah_plugin_download, all you need to do is to basically, in txp_plugins table set the flags field’s value to 3
. And also, remember to update to the newest version to rah_plugin_download if you haven’t already.
There are two flags you can use (well three if none is counted), both are values;
- 0 = No flags
- 1 = Has preferences
- 2 = Has plugin Lifecycle function.
As you are offering both, an options link and an un/install procedure, the correct value for you would be (1+2) 3
.
Last edited by Gocom (2011-03-15 16:53:40)
Offline
Re: Plugin Lifecycle Callback Troubleshooting
Hmmm, maybe the issue is with ied_plugin_composer because I do have those check boxes checked there. Or are you saying earlier versions of rah_plugin_download didn’t support these?
I’ve now checked the database and confirmed flags = 3 for the plugin I mentioned above.
Last edited by MattD (2011-03-15 17:48:40)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Plugin Lifecycle Callback Troubleshooting
MattD wrote:
Hmmm, maybe the issue is with ied_plugin_composer because I do have those check boxes checked there.
The plugin file I downloaded from your site didn’t have flags set at all.
Or are you saying earlier versions of rah_plugin_download didn’t support these?
Not all versions, as the plugin was released before TXP v4.2.0. Version 0.8 added support for flags to rah_plugin_download (newest version being 1.0).
Offline
Re: Plugin Lifecycle Callback Troubleshooting
I think i’ve got it fixed.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Offline