danwolfgang/mt-plugin-more-listing-framework-columns — pull request #3 by dphillips (2014-03-12 18:47:11+00:00)
Title: Bugfix - Fix javascript listing filters data

When viewing a listing framework screen, Movable Type renders the overall page, then javascript issues a background request for the actual list data to be displayed. The listing filters displayed externally to the user are correct, but the background javascript retrieves the internal filters list again (and each time a filter is applied or removed), overwriting the first internal filters list retrieved by MT. The internal filters list retrieved by the background javascript will not be in sync with the externally displayed filters list if there are listing filters created by another user. This can cause user-defined filters to behave incorrectly when they are clicked on because the externally displayed filters list will have more filters than the internal filters list used by javascript to handle the click action.

To address this issue, this bugfix adds a cms_filtered_list_param callback and sub to call the build_filters sub when a request comes in via javascript (mode=filtered_list), to modify the filters list that is returned to the javascript in the same manner that the external filters list was.

To see an example of this issue, log in to the mt.org Movable Type installation, browse to the Documentation blog, then browse to the Pages > Manage page. Click on "All Filters" and try applying any of the filters under "My Filters". Most if not all of the filters under "My Filters" should display the wrong filter name and apply the wrong filter - the name of a "Built in Filter" should be displayed and applied instead.