how to identify custom widgets that are not being used in the community?

Hi 

Has anyone known how to get a list of the custom widgets that are not being used in the community?


Thanks,

Igor

  • There's not currently a way to do this, other than manually checking each widget in the widget replacement UI to see if any usages appear.

  • Hmm, if you have database access, you could check the list of widget IDs against the table cs_ConfiguredContentFragments and te_ContentFragmentContainer_ConfiguredContentFragments.

    This finds all instances of the widgets you specify..

    SELECT * FROM te_ContentFragmentContainer_ConfiguredContentFragments WHERE type IN (
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')

    So when you're looking for the absence of the ID in the Type column it starts to get a bit messy, but this SQL does the job and doesn't need any temporary tables..

    SELECT widgetid FROM (VALUES 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1'), 
    	  ('Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')) 
    	x(widgetid)
    WHERE widgetid NOT IN (
    	SELECT Type FROM te_ContentFragmentContainer_ConfiguredContentFragments WHERE type IN (
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')
    ) AND widgetid NOT IN (
    	SELECT Type FROM cs_ConfiguredContentFragments WHERE type IN (
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::1ff8f59815104b0f83ba6c9b6407ddea', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::426c0675f92b42d685334bb1d821d77f', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::b79ba25fa17048ba83bb844fc80bab5b', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::cfd198a1ce7c46bf8f95b41068118df1', 
    	'Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.Platform::f2064dd6ed32464f98756f30d684f32c')
    )

    You'd need to get a list of your custom widgets from somewhere. I got my list from the file system & copied the names out into Notepad++ to massage them into the SQL above.

    Since I'm relatively new to this, I'm maybe missing something.. but hopefully this is a good starting point.

  • Another way you might be able to achieve this is using the Bulk Replace Widgets admin feature.. it shows you where a widget is being used, e.g.

  • It is imperative to point out that accessing the database in this fashion described above is not supported.  Querying or modifying existing schema or data within that schema outside of an API is not supported.

  • Yeah, and I think that's why I now prefer the Bulk Replace Widgets approach to finding out about widget usage. It works pretty well & doesn't need a database query to be run.