HTML Widget and Page Display Issues

    This applies to: 1.10.x, 2.0.x, 2.5.x (Note: We are looking into some safety prevention measures as of 1.10.16, 2.0.10 and 2.5.4, so some of this information may be obsolete by then -- but still use the HTML widget with caution!)

     

    High-Level Summary: Improper use of the HTML widget can make your day go from bad to worse. There are also steps for removing the widget from your space via the database if you ever get to the point where the space can't be customized.

     

    "Title Goes Here </div>"

     

    I'm sitting here working on my local Clearspace instance and I come across this page:

     

    div2.png

     

    Ouch. Let's take a look at the HTML widget and see what could have happened:

     

    div1.png

    It looks like I have a closing DIV tag but no open one. In this case, it's prematurely closing a DIV tag from somewhere else on the page and causes rendering issues. In extreme cases, unmatched tags or incorrect HTML can render the entire site unusable and force your admin to take the site down and delete the widget from the database.

     

    The HTML Widget should be reserved for users who are fairly confident in their HTML skills (and don't mind taking some flack if things go south ). In most cases, the Formatted Text Widget will work just as well as the HTML Widget. Text in general formats much better on the former:

     

    compare.png

    Removing the HTML widget: You can delete a few rows from your database in order to get rid of the HTML widget on a given space. Remember to back up your database before manually altering anything.

     

    1. Stop the server (since we'll be altering the database manually)
    2. Look up the widgetID in jivewidget (it should be 1014 in a default instance)
    3. Do a SELECT * FROM jivewidgetframe WHERE parentObjectType=14 AND parentObjectID=???? AND widgetID=????
      1. Where parentObjectType is the community, the parentObjectID is the community ID and the widget ID is the HTML widget ID
    4. With the frameIDs that were returned, use them to delete the rows from jivewidgetfrmprop
    5. Using those frameIDs, delete them from jivewidgetframe
    6. Start the server