Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-04 14:54:47

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#2 2011-03-15 16:50:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#3 2011-03-15 17:27:26

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#4 2011-03-15 18:06:51

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#5 2011-03-15 19:12:26

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Plugin Lifecycle Callback Troubleshooting

I think i’ve got it fixed.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#6 2011-03-15 19:23:35

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Plugin Lifecycle Callback Troubleshooting

MattD wrote:

I think i’ve got it fixed.

Yes, you did :)

Offline

Board footer

Powered by FluxBB