Simple Elgg Plugin -- AU Widgets Reordering Debug

Plugin Name: AU Widgets Reordering Debug or au_widgets_reordering_debug

Download: here

Sponsored By: Athabasca University

AU Widgets Reordering Debug is a Simple Elgg Plugin that demonstrates how to extend (not override!) the main Elgg css file (technically an Elgg "view"); in this case, I do it to display the widget reordering textareas debugField1, debugField2, debugField3 using "display:block !important" where the "!important" part is required in order for this stylesheet to override the inline "display:none" css style.

If you have an Elgg widget canvas that is acting flaky when you try to add, subtract, or reorder widgets, this plugin should help debug.

To use this plugin:

  • Enable as usual. Three textareas will appear below the Save button on widget canvas pages (e.g. profile, dashboard)
  • If you see the contents of the textareas change as soon as you click "save", but before the result comes back from the server, you may have a problem with the ids on the page and/or with TinyMCE modifying the contents of these three fields when it shouldn't. (See below).

Tips: custom_index_widgets reuses the following three ids debugField1, debugField2, debugField3 even though they are apparently not used; try renaming them to debugField1a, debugField2a, debugField3a, since apparently reusing ids can cause unpredictable results.

Also, adding the class "mceNoEditor" to any debugField textareas, as well as adding the following configuration to the tinymce.init configuration method found in mod/tinymce should keep TinyMCE javascript from rewriting the content before it is submitted to the server:

editor_deselector : "mceNoEditor"