diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml
index 85dfd75280108453a60b38aab8b30ced18407b00..a80be5a6de8c352314b46d10fdb31df7425cfc58 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml
@@ -260,7 +260,8 @@ XXX: Folder_filter accesses selection directly\n
           <span class="description" i18n:translate="" i18n:domain="ui">Show All</span>\n
         </button>\n
         <button type="submit" name="Folder_filter:method" title="Filter"\n
-                tal:attributes="class python:(here.portal_selections.getSelectionFor(selection_name) is not None and here.portal_selections.getSelectionFor(selection_name).isInvertMode()) and \'filter_on\' or \'filter\';"\n
+                tal:define="selection python: here.portal_selections.getSelectionFor(request[\'selection_name\'])"\n
+                tal:attributes="class python:(selection is not None and selection.isInvertMode()) and \'filter_on\' or \'filter\';"\n
                 i18n:attributes="title" i18n:domain="ui">\n
           <span class="image"></span>\n
           <span class="description" i18n:translate="" i18n:domain="ui">Filter</span>\n