When does widget provider initialize method get invoked? Or how can I trigger it?

When does widget provider initialize method get invoked? Or how can I trigger it?

This question is answered

If I have a custom default widget provider and modify one of the widgets, copy my dll over to my bin folder, what will trigger the Initialize method?  Do I need to recycle the app pool?  clear widget cache?

Verified Answer
  • Core widgets aren’t installed from resources, they are distributed in the filesystem, you can simply go back to your installation package and replace the files and recycle.
     
    Patrick Mason
    Development Lead- Extensibility
    o: 214.420.1329
    telligent.com
     
    From: lucasrd [mailto:bounce-lucasrd@communities.telligent.com]
    Sent: Thursday, September 13, 2012 8:00 AM
    To: bugsandissues@communities.telligent.com
    Subject: RE: [Bugs and Issues - Telligent Community] When does widget provider initialize method get invoked? Or how can I trigger it?
     

    Thanks Patrick.  In this specific case, one of the factory default widgets would have been edited out on filestorage (by opening the file and changing it).  I'm wondering if there is a way to revert all of those widgets?  Would I enable/disable the Core Default widget/core functionality plugin?

All Replies
  • More specifically - let's say a default widget file (from the telligent default widgets) was manually updated on file storage  - is there any way to pull the resource from the dll and revert it back that way via control panel?

  • In 6.x plugin initialization should occur for enabled plugins when the plugin page is saved or the app pool recycles.
     
    When you say “update in filestorage pull resource from dll) are you meaning you installed widgets from embedded resources and the file that was created was changed manually and you want to undo that?
     
    If that’s the case if you use initialize to install widgets from embedded resources, just disable and re-enable the plugin which will fir the initialize again when enabled.  Cache should expire but just in case you can clear it in the developer tools section where you clear theme cache.  If the widget was changed via Widget Studio you will need to revert to factory default.
     
    Patrick Mason
    Development Lead- Extensibility
    o: 214.420.1329
    telligent.com
     
    From: lucasrd [mailto:bounce-lucasrd@communities.telligent.com]
    Sent: Wednesday, September 12, 2012 9:35 PM
    To: bugsandissues@communities.telligent.com
    Subject: RE: [Bugs and Issues - Telligent Community] When does widget provider initialize method get invoked? Or how can I trigger it?
     

    More specifically - let's say a default widget file was updated on file storage  - is there any way to pull the resource from the dll and revert it back that way via control panel?

  • Thanks Patrick.  In this specific case, one of the factory default widgets would have been edited out on filestorage (by opening the file and changing it).  I'm wondering if there is a way to revert all of those widgets?  Would I enable/disable the Core Default widget/core functionality plugin?

  • Core widgets aren’t installed from resources, they are distributed in the filesystem, you can simply go back to your installation package and replace the files and recycle.
     
    Patrick Mason
    Development Lead- Extensibility
    o: 214.420.1329
    telligent.com
     
    From: lucasrd [mailto:bounce-lucasrd@communities.telligent.com]
    Sent: Thursday, September 13, 2012 8:00 AM
    To: bugsandissues@communities.telligent.com
    Subject: RE: [Bugs and Issues - Telligent Community] When does widget provider initialize method get invoked? Or how can I trigger it?
     

    Thanks Patrick.  In this specific case, one of the factory default widgets would have been edited out on filestorage (by opening the file and changing it).  I'm wondering if there is a way to revert all of those widgets?  Would I enable/disable the Core Default widget/core functionality plugin?

  • Thanks Patrick...

    So, guessing this means when we upgrade to 6.x we'd have to manually copy the filestorage folder into our CFS?

  • Lets back up…. Are we talking pre- 6.0?  I might have made a bad assumption here J
     
    So if you are on 5.6… widget files are in the utility/contentfragments folder and can be replaced there, not filestorage.  Now there could also be an ascx file in the themes /{themename}/ContentFragments that is theme specifc, you will need to make sure.
     
    In 6.x widgets are stored and dealt with differently(via filestorage).  Unless it’s a custom widget you will be using a new studio version of the widget and changes made to a core ascx file will be lost in upgrade
     
    Patrick Mason
    Development Lead- Extensibility
    o: 214.420.1329
    telligent.com
     
    From: lucasrd [mailto:bounce-lucasrd@communities.telligent.com]
    Sent: Thursday, September 13, 2012 10:36 AM
    To: bugsandissues@communities.telligent.com
    Subject: RE: [Bugs and Issues - Telligent Community] When does widget provider initialize method get invoked? Or how can I trigger it?
     

    Thanks Patrick...

    So, guessing this means when we upgrade to 6.x we'd have to manually copy the filestorage folder into our CFS?