diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
index c9bf419d22d36106b6b66ff32dc7f97716347662..43f0afbbecaf38e0ab59cadf4f71c54cdfda2a06 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml
@@ -68,7 +68,7 @@
             <value> <string>portal_preferences = context.portal_preferences\n
 \n
 preference = portal_preferences.getActivePreference()\n
-if preference.getPreferenceState()!=\'enabled\':\n
+if preference is None or preference.getPreferenceState()!=\'enabled\':\n
   p = portal_preferences.newContent()\n
   p.setTitle(\'Document Template Container\')\n
   p.enable()\n
@@ -135,6 +135,7 @@ return context.Base_redirect(form_id,\n
                             <string>context</string>
                             <string>portal_preferences</string>
                             <string>preference</string>
+                            <string>None</string>
                             <string>p</string>
                             <string>parent</string>
                             <string>document_id</string>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index ce7f605a46ac20bbe5529f34b8e6b6d19e5e0da1..8e6862383d3ca1f23e51b1467e98ee692e765b43 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-683
\ No newline at end of file
+684
\ No newline at end of file