From 8c8fdde1e4c0eee6bfb4c2ea6b6d10d3968678c8 Mon Sep 17 00:00:00 2001
From: Tristan Cavelier <tristan.cavelier@nexedi.com>
Date: Mon, 21 Dec 2015 13:10:15 +0000
Subject: [PATCH] erp5_web: XXX caching_policy_manager

---
 .../caching_policy_manager.xml                | 313 ++++--------------
 1 file changed, 72 insertions(+), 241 deletions(-)

diff --git a/bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml b/bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
index 6f46033866..fc948f6c50 100644
--- a/bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
+++ b/bt5/erp5_web/ToolTemplateItem/caching_policy_manager.xml
@@ -16,15 +16,14 @@
             <key> <string>_policy_ids</string> </key>
             <value>
               <tuple>
-                <string>no-cache</string>
-                <string>one-day-max-modification-date</string>
-                <string>one-hour-max-modification-date</string>
-                <string>must-revalidate</string>
-                <string>public-conversion-result-no-language</string>
-                <string>public-conversion-result</string>
-                <string>unauthenticated no language</string>
+                <string>published image no language</string>
+                <string>published image</string>
+                <string>forum no cache</string>
+                <string>discussion thread no cache</string>
+                <string>RSS no cache</string>
+                <string>unauthenticated web pages no language</string>
+                <string>unauthenticated web pages</string>
                 <string>unauthenticated</string>
-                <string>hateoas</string>
                 <string>authenticated</string>
               </tuple>
             </value>
@@ -43,7 +42,7 @@
             <value>
               <dictionary>
                 <item>
-                    <key> <string>authenticated</string> </key>
+                    <key> <string>RSS no cache</string> </key>
                     <value>
                       <object>
                         <klass>
@@ -94,7 +93,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>authenticated</string> </value>
+                                <value> <string>RSS no cache</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -132,14 +131,6 @@
                                   <none/>
                                 </value>
                             </item>
-                            <item>
-                                <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
                             <item>
                                 <key> <string>_vary</string> </key>
                                 <value> <string></string> </value>
@@ -150,7 +141,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>hateoas</string> </key>
+                    <key> <string>authenticated</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -173,7 +164,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>1800</int> </value>
+                                <value> <int>0</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -191,7 +182,7 @@
                             </item>
                             <item>
                                 <key> <string>_no_store</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_no_transform</string> </key>
@@ -199,7 +190,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>hateoas</string> </value>
+                                <value> <string>authenticated</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -221,7 +212,7 @@
                             </item>
                             <item>
                                 <key> <string>_private</string> </key>
-                                <value> <int>1</int> </value>
+                                <value> <int>0</int> </value>
                             </item>
                             <item>
                                 <key> <string>_proxy_revalidate</string> </key>
@@ -237,17 +228,9 @@
                                   <none/>
                                 </value>
                             </item>
-                            <item>
-                                <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Cookie, Authorization</string> </value>
+                                <value> <string></string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -255,7 +238,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>must-revalidate</string> </key>
+                    <key> <string>discussion thread no cache</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -264,7 +247,7 @@
                           <dictionary>
                             <item>
                                 <key> <string>_enable_304s</string> </key>
-                                <value> <int>1</int> </value>
+                                <value> <int>0</int> </value>
                             </item>
                             <item>
                                 <key> <string>_etag_func</string> </key>
@@ -288,15 +271,15 @@
                             </item>
                             <item>
                                 <key> <string>_must_revalidate</string> </key>
-                                <value> <int>1</int> </value>
+                                <value> <int>0</int> </value>
                             </item>
                             <item>
                                 <key> <string>_no_cache</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_no_store</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_no_transform</string> </key>
@@ -304,7 +287,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>must-revalidate</string> </value>
+                                <value> <string>discussion thread no cache</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -334,7 +317,7 @@
                             </item>
                             <item>
                                 <key> <string>_public</string> </key>
-                                <value> <int>1</int> </value>
+                                <value> <int>0</int> </value>
                             </item>
                             <item>
                                 <key> <string>_s_max_age_secs</string> </key>
@@ -352,7 +335,7 @@
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
+                                <value> <string></string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -360,7 +343,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>no-cache</string> </key>
+                    <key> <string>forum no cache</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -379,7 +362,7 @@
                             </item>
                             <item>
                                 <key> <string>_last_modified</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
@@ -401,7 +384,7 @@
                             </item>
                             <item>
                                 <key> <string>_no_store</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_no_transform</string> </key>
@@ -409,7 +392,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>no-cache</string> </value>
+                                <value> <string>forum no cache</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -447,14 +430,6 @@
                                   <none/>
                                 </value>
                             </item>
-                            <item>
-                                <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
                             <item>
                                 <key> <string>_vary</string> </key>
                                 <value> <string></string> </value>
@@ -465,7 +440,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>one-day-max-modification-date</string> </key>
+                    <key> <string>published image</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -488,7 +463,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
+                                <value> <int>3600</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -514,7 +489,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>one-day-max-modification-date</string> </value>
+                                <value> <string>published image</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -554,15 +529,15 @@
                             </item>
                             <item>
                                 <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>172800</int> </value>
                             </item>
                             <item>
                                 <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
+                                <value> <int>43200</int> </value>
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Cookie, Authorization</string> </value>
+                                <value> <string>Accept-Language, Accept-Encoding</string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -570,7 +545,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>one-hour-max-modification-date</string> </key>
+                    <key> <string>published image no language</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -593,7 +568,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
+                                <value> <int>3600</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -619,7 +594,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>one-hour-max-modification-date</string> </value>
+                                <value> <string>published image no language</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -649,7 +624,7 @@
                             </item>
                             <item>
                                 <key> <string>_public</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>1</int> </value>
                             </item>
                             <item>
                                 <key> <string>_s_max_age_secs</string> </key>
@@ -659,15 +634,15 @@
                             </item>
                             <item>
                                 <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>172800</int> </value>
                             </item>
                             <item>
                                 <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
+                                <value> <int>43200</int> </value>
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Cookie, Authorization, Accept-Encoding</string> </value>
+                                <value> <string>Accept-Encoding</string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -675,7 +650,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>public-conversion-result</string> </key>
+                    <key> <string>unauthenticated</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -698,7 +673,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
+                                <value> <int>3600</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -724,7 +699,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>public-conversion-result</string> </value>
+                                <value> <string>unauthenticated</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -768,11 +743,11 @@
                             </item>
                             <item>
                                 <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
+                                <value> <int>36000</int> </value>
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Accept-Language, Cookie</string> </value>
+                                <value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -780,7 +755,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>public-conversion-result-no-language</string> </key>
+                    <key> <string>unauthenticated web pages</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -803,7 +778,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
+                                <value> <int>3600</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -829,7 +804,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>public-conversion-result-no-language</string> </value>
+                                <value> <string>unauthenticated web pages</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -869,15 +844,15 @@
                             </item>
                             <item>
                                 <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>172800</int> </value>
                             </item>
                             <item>
                                 <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
+                                <value> <int>43200</int> </value>
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string></string> </value>
+                                <value> <string>Accept-Language, Cookie, Authorization, Accept-Encoding</string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -885,7 +860,7 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>unauthenticated</string> </key>
+                    <key> <string>unauthenticated web pages no language</string> </key>
                     <value>
                       <object>
                         <klass> <reference id="2.1"/> </klass>
@@ -908,7 +883,7 @@
                             </item>
                             <item>
                                 <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
+                                <value> <int>3600</int> </value>
                             </item>
                             <item>
                                 <key> <string>_mtime_func</string> </key>
@@ -934,7 +909,7 @@
                             </item>
                             <item>
                                 <key> <string>_policy_id</string> </key>
-                                <value> <string>unauthenticated</string> </value>
+                                <value> <string>unauthenticated web pages no language</string> </value>
                             </item>
                             <item>
                                 <key> <string>_post_check</string> </key>
@@ -974,120 +949,15 @@
                             </item>
                             <item>
                                 <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_vary</string> </key>
-                                <value> <string>Accept-Language, Cookie, Authorization</string> </value>
-                            </item>
-                          </dictionary>
-                        </state>
-                      </object>
-                    </value>
-                </item>
-                <item>
-                    <key> <string>unauthenticated no language</string> </key>
-                    <value>
-                      <object>
-                        <klass> <reference id="2.1"/> </klass>
-                        <tuple/>
-                        <state>
-                          <dictionary>
-                            <item>
-                                <key> <string>_enable_304s</string> </key>
-                                <value> <int>1</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_etag_func</string> </key>
-                                <value>
-                                  <persistent> <string encoding="base64">AAAAAAAAAB4=</string> </persistent>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_last_modified</string> </key>
-                                <value> <int>1</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_max_age_secs</string> </key>
-                                <value> <int>600</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_mtime_func</string> </key>
-                                <value>
-                                  <persistent> <string encoding="base64">AAAAAAAAAB8=</string> </persistent>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_must_revalidate</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_no_cache</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_no_store</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_no_transform</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_policy_id</string> </key>
-                                <value> <string>unauthenticated no language</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>_post_check</string> </key>
-                                <value>
-                                  <none/>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_pre_check</string> </key>
-                                <value>
-                                  <none/>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_predicate</string> </key>
-                                <value>
-                                  <persistent> <string encoding="base64">AAAAAAAAACA=</string> </persistent>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_private</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_proxy_revalidate</string> </key>
-                                <value> <int>0</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_public</string> </key>
-                                <value> <int>1</int> </value>
-                            </item>
-                            <item>
-                                <key> <string>_s_max_age_secs</string> </key>
-                                <value>
-                                  <none/>
-                                </value>
-                            </item>
-                            <item>
-                                <key> <string>_stale_if_error_secs</string> </key>
-                                <value> <int>0</int> </value>
+                                <value> <int>172800</int> </value>
                             </item>
                             <item>
                                 <key> <string>_stale_while_revalidate_secs</string> </key>
-                                <value> <int>360000</int> </value>
+                                <value> <int>43200</int> </value>
                             </item>
                             <item>
                                 <key> <string>_vary</string> </key>
-                                <value> <string>Cookie, Authorization</string> </value>
+                                <value> <string>Cookie, Authorization, Accept-Encoding</string> </value>
                             </item>
                           </dictionary>
                         </state>
@@ -1134,7 +1004,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is not None</string> </value>
+            <value> <string>python: member is None and "/WebSection_viewContentListAsRSS" in request.get("URL")</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1173,7 +1043,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is not None and (lambda x: x is not None and x.getCachingPolicy() =="hateoas")(object.getWebSectionValue()) and request.get("X-HATEOAS-CACHE")</string> </value>
+            <value> <string>python: member is not None</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1212,7 +1082,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: (lambda x: x is not None and x.getCachingPolicy() == \'must-revalidate\')(object.getWebSectionValue())</string> </value>
+            <value> <string>python: object.getPortalType() == "Discussion Thread"</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1238,7 +1108,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>object/modified</string> </value>
+            <value> <string>python: getattr(object, \'getModificationDate\', object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1251,7 +1121,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'no-cache\')(object.getWebSectionValue())</string> </value>
+            <value> <string>python: member is None and object.getPortalType() in ("Web Page", "Web Section", "Web Site") and object.getId() == "forum"</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1277,7 +1147,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime())</string> </value>
+            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1290,7 +1160,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-day-max-modification-date\')(object.getWebSectionValue())</string> </value>
+            <value> <string>python: object.getPortalType() in ("Image") and object.getValidationState() in ("published", "published_alive")</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1316,7 +1186,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: max(getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)(), DateTime().earliestTime()  + (DateTime().hour() /24.0))</string> </value>
+            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\',  object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1329,7 +1199,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is None and (lambda x: x is not None and x.getCachingPolicy() == \'one-hour-max-modification-date\')(object.getWebSectionValue())</string> </value>
+            <value> <string>python: object.getPortalType() in ("Image") and  object.getValidationState() in ("published", "published_alive") and  object.getWebSiteValue() is not None and (  len(object.getWebSiteValue().getAvailableLanguageSet()) == 1 or  object.getWebSiteValue().getStaticLanguageSelection() )</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1355,7 +1225,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: getattr(object, \'getModificationDate\', object.modified)()</string> </value>
+            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1368,7 +1238,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
+            <value> <string>python: member is None</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1394,7 +1264,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: getattr(object, \'getModificationDate\', object.modified)()</string> </value>
+            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1407,7 +1277,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: object.Base_isPublicConvertionResult() and (lambda x: x is not None and (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
+            <value> <string>python: member is None and object.getPortalType() in ("Web Page", "Web Section")</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1433,7 +1303,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
+            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\',  object.modified)()</string> </value>
         </item>
       </dictionary>
     </pickle>
@@ -1446,46 +1316,7 @@
       <dictionary>
         <item>
             <key> <string>text</string> </key>
-            <value> <string>python: member is None and (lambda x: x is not None and not (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="30" aka="AAAAAAAAAB4=">
-    <pickle>
-      <global name="Expression" module="Products.CMFCore.Expression"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>text</string> </key>
-            <value> <string></string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="31" aka="AAAAAAAAAB8=">
-    <pickle>
-      <global name="Expression" module="Products.CMFCore.Expression"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>text</string> </key>
-            <value> <string>python: getattr(object, \'Base_getWebDocumentDrivenModificationDate\', object.modified)()</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-  <record id="32" aka="AAAAAAAAACA=">
-    <pickle>
-      <global name="Expression" module="Products.CMFCore.Expression"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>text</string> </key>
-            <value> <string>python: member is None and (lambda x: x is not None and (len(x.getAvailableLanguageSet()) == 1 or x.getStaticLanguageSelection()))(object.getWebSectionValue())</string> </value>
+            <value> <string>python: member is None and object.getPortalType() in ("Web Page", "Web  Section", "Web Site") and object.getWebSiteValue() is not None and (  len(object.getWebSiteValue().getAvailableLanguageSet()) == 1 or  object.getWebSiteValue().getStaticLanguageSelection() )</string> </value>
         </item>
       </dictionary>
     </pickle>
-- 
2.30.9