[Testbot] Plone 4.3 - Python 2.6 - Build # 1829 - Still failing! - 13 failure(s)

jenkins at plone.org jenkins at plone.org
Fri Mar 7 10:22:38 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 1829 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.6/1829/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-03-06T05:49:46-08:00
Author: Johannes Raggam (thet) <raggam-nl at adm.at>
Commit: https://github.com/plone/plone.app.contenttypes/commit/e57458063ceb23fda3f8edf987e2ee84614c7675

refactor to reuse content-core macro

Files changed:
A plone/app/contenttypes/migration/migrator.css
M plone/app/contenttypes/migration/atct_migrator.pt
M plone/app/contenttypes/migration/atct_migrator_results.pt
M plone/app/contenttypes/migration/configure.zcml
M plone/app/contenttypes/migration/utils.py

diff --git a/plone/app/contenttypes/migration/atct_migrator.pt b/plone/app/contenttypes/migration/atct_migrator.pt
index ba617ac..d9fa25d 100644
--- a/plone/app/contenttypes/migration/atct_migrator.pt
+++ b/plone/app/contenttypes/migration/atct_migrator.pt
@@ -1,7 +1,3 @@
-<tal:page
-  tal:define="ajax_load python:request.set('ajax_load', True);
-      ajax_include_head python:request.set('ajax_include_head', True)">
-
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
       xmlns:tal="http://xml.zope.org/namespaces/tal"
       xmlns:metal="http://xml.zope.org/namespaces/metal"
@@ -9,143 +5,82 @@
       lang="en"
       metal:use-macro="context/main_template/macros/master"
       i18n:domain="plone">
-  <metal:block fill-slot="top_slot"
-      tal:define="dummy python:request.set('disable_border',1);
-          disable_column_two python:request.set('disable_plone.rightcolumn',1);
-          disable_column_two python:request.set('disable_plone.leftcolumn',1)">
-
-    <style type="text/css">
-      div.important {
-        padding: .9em 1.2em;
-        border-radius: 10px;
-        font-size: 100%;
-      }
-      .btn-danger {
-        background-color: #DA4F49;
-        background-image: linear-gradient(to bottom, #EE5F5B, #BD362F);
-        background-repeat: repeat-x;
-        border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-        color: #FFFFFF;
-        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-        border-radius: 4px 4px 4px 4px;
-        border-style: solid;
-        border-width: 1px;
-        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);    cursor: pointer;
-        display: inline-block;
-        font-size: 14px;
-        line-height: 20px;
-        margin-bottom: 0;
-        padding: 4px 12px;
-        text-align: center;
-        vertical-align: middle;
-      }
-
-      .btn-danger:hover, .btn-danger:focus,
-      .btn-danger:active, .btn-danger.active {
-          color: rgb(255, 255, 255);
-          background-color: rgb(189, 54, 47);
-          text-decoration: none;
-          background-position: 0px -15px;
-          transition: background-position 0.1s linear 0s;
-      }
-
-      .btn-danger:active {
-          background-image: none;
-          outline: 0px none;
-          box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15) inset, 0px 1px 2px rgba(0, 0, 0, 0.05);
-      }
-      #migration-form {
-          border: 1px solid #DDDDDD;
-          border-radius: 10px 10px 10px 10px;
-          font-size: 110%;
-          margin-bottom: 1em;
-          padding: 1em 1.5em;
-      }
 
-      #migration-form .formControls {
-        margin-left: 0;
-        margin-top: 4em;
-      }
-      #migration-options {
-        margin-top: 3em;
-      }
+<metal:block fill-slot="top_slot"
+    tal:define="dummy python:request.set('disable_border', 1);
+                disable_column_two python:request.set('disable_plone.rightcolumn', 1);
+                disable_column_two python:request.set('disable_plone.leftcolumn', 1);
+                portal_state context/@@plone_portal_state;
+                portal_url portal_state/portal_url">
+  <link rel="stylesheet" type="text/css" href="" media="screen" tal:attributes="href string:${portal_url}/++resource++pac_migrator.css">
+</metal:block>
 
-      .strong {
-        font-size: 150%;
-        font-weight: bold;
-      }
-    </style>
+<body>
 
-  </metal:block>
+<metal:custom_title fill-slot="content-title">
+  <h1 class="documentFirstHeading" i18n:translate="">Migration control panel</h1>
+</metal:custom_title>
+<metal:custom_desc fill-slot="content-description">
+  <div class="documentDescription" i18n:translate="">Migrate Archetypes content types to respective Dexterity content types.</div>
+</metal:custom_desc>
 
-  <body metal:use-macro="content">
-
-    <metal:bodytext fill-slot="main">
-      <metal:main define-macro="main"
-        tal:define="linguaplone_installed context/@@atct_migrator_helpers/linguaplone_installed;
-                    object_number context/@@atct_migrator_helpers/objects_to_be_migrated">
-        <div tal:replace="structure provider:plone.abovecontenttitle" />
-        <h1 class="documentFirstHeading"
-            i18n:translate="">Migration control panel</h1>
-        <div class="documentDescription"
-            i18n:translate="">Migrate Archetypes content types to respective Dexterity content types.</div>
-        <div tal:replace="structure provider:plone.abovecontentbody" />
-
-        <div id="content-core">
-          <div class="important">
-            <h2 i18n:translate="">Important</h2>
-            <p i18n:translate="">Before migrating your content please read the <a href="https://github.com/plone/plone.app.contenttypes#migration">migration-section in the documentation of plone.app.contenttypes</a></p>
-            <h3>Migrating content that is translated with LinguaPlone</h3>
-            <p i18n:translate="">Since LinguaPlone does not support Dexterity you need to migrate from LinguaPlone to <a href="http://pypi.python.org/pypi/plone.app.multilingual">plone.app.multilingual</a>. The migration from Products.LinguaPlone to plone.app.multilingual should happen before the migration from Archetypes to plone.app.contenttypes. For details on the migration see the <a href="http://pypi.python.org/pypi/plone.app.multilingual#linguaplone-migration">documentation</a></p>
-            <h3 i18n:translate="">Migrating default-content that was extended with archetypes.schemaextender</h3>
-            <p i18n:translate="">The migration should warn you if any of your types are extended with <a href="https://pypi.python.org/pypi/archetypes.schemaextender">archetypes.schemaextender</a>. You can still migrate this content but the data contained in these fields will be lost.
-            If you need to keep the data in these fields you need to write a custom migration for your types and dexterity-behaviors for the data stored in the extended fields.</p>
-            <h3 i18n:translate="">Note about how long it might take</h3>
-            <p i18n:translate="">Depending of the number of archetypes in your portal, it may take a <span class="strong">really</span> long time for the migration to be done.
-              Stay calm and be patient.</p>
-          </div>
-          <tal:block condition="object_number">
-            <tal:block condition="not:linguaplone_installed">
-              <div class="important">
-                <h2 i18n:translate="">Estimation</h2>
-                <p i18n:translate="">You currently have <span class="strong" i18n:name="number_of_objects" tal:content="context/@@atct_migrator_helpers/objects_to_be_migrated">23</span> archetypes objects to be migrated.</p>
-                <p i18n:translate="" tal:define="time context/@@atct_migrator_helpers/estimated_migration_time">The estimated time for the migration is around :
-                <span class="strong">
-                  <tal:block i18n:name="hours" content="time/hours">4</tal:block> hours
-                  <tal:block i18n:name="minutes" content="time/minutes">45</tal:block> minutes
-                  <tal:block i18n:name="seconds" content="time/seconds">23</tal:block> seconds
-                </span>
-                </p>
-              </div>
-              <div id="migration-options">
-                <h2 i18n:translate="">Migrate contents</h2>
-                <div i18n:translate=""
-                  class="documentDescription">
-                  <p>You can select which content types you want to migrate and
-                    choose to migrate references or not.</p>
-                </div>
-                <div id="migration-form"
-                     tal:content="structure view/contents">
-                     This is the real migration form
-                </div>
-              </div>
-            </tal:block>
-            <tal:block condition="linguaplone_installed">
-              <div class="important">
-                <h2 i18n:translate="">Warning</h2>
-                <p i18n:translate="" class="strong">Since you effectively have Products.LinguaPlone installed in your portal, you're not allowed to continue this migration.</p>
-                <p i18n:translate="">Have a look above for more information.</p>
-              </div>
-              </tal:block>
-          </tal:block>
-          <tal:block condition="not:object_number">
-            <div class="important">
-              <h2 i18n:translate="">Warning</h2>
-              <p i18n:translate="" class="strong">No content to migrate.</p>
-          </tal:block>
+<metal:content-core fill-slot="content-core">
+<metal:block define-macro="content-core"
+    tal:define="linguaplone_installed context/@@atct_migrator_helpers/linguaplone_installed;
+                object_number context/@@atct_migrator_helpers/objects_to_be_migrated">
+  <div class="important">
+    <h2 i18n:translate="">Important</h2>
+    <p i18n:translate="">Before migrating your content please read the <a href="https://github.com/plone/plone.app.contenttypes#migration">migration-section in the documentation of plone.app.contenttypes</a></p>
+    <h3>Migrating content that is translated with LinguaPlone</h3>
+    <p i18n:translate="">Since LinguaPlone does not support Dexterity you need to migrate from LinguaPlone to <a href="http://pypi.python.org/pypi/plone.app.multilingual">plone.app.multilingual</a>. The migration from Products.LinguaPlone to plone.app.multilingual should happen before the migration from Archetypes to plone.app.contenttypes. For details on the migration see the <a href="http://pypi.python.org/pypi/plone.app.multilingual#linguaplone-migration">documentation</a></p>
+    <h3 i18n:translate="">Migrating default-content that was extended with archetypes.schemaextender</h3>
+    <p i18n:translate="">The migration should warn you if any of your types are extended with <a href="https://pypi.python.org/pypi/archetypes.schemaextender">archetypes.schemaextender</a>. You can still migrate this content but the data contained in these fields will be lost.
+    If you need to keep the data in these fields you need to write a custom migration for your types and dexterity-behaviors for the data stored in the extended fields.</p>
+    <h3 i18n:translate="">Note about how long it might take</h3>
+    <p i18n:translate="">Depending of the number of archetypes in your portal, it may take a <span class="strong">really</span> long time for the migration to be done.
+      Stay calm and be patient.</p>
+  </div>
+  <tal:block condition="object_number">
+    <tal:block condition="not:linguaplone_installed">
+      <div class="important">
+        <h2 i18n:translate="">Estimation</h2>
+        <p i18n:translate="">You currently have <span class="strong" i18n:name="number_of_objects" tal:content="context/@@atct_migrator_helpers/objects_to_be_migrated">23</span> archetypes objects to be migrated.</p>
+        <p i18n:translate="" tal:define="time context/@@atct_migrator_helpers/estimated_migration_time">The estimated time for the migration is around :
+        <span class="strong">
+          <tal:block i18n:name="hours" content="time/hours">4</tal:block> hours
+          <tal:block i18n:name="minutes" content="time/minutes">45</tal:block> minutes
+          <tal:block i18n:name="seconds" content="time/seconds">23</tal:block> seconds
+        </span>
+        </p>
+      </div>
+      <div id="migration-options">
+        <h2 i18n:translate="">Migrate contents</h2>
+        <div i18n:translate=""
+          class="documentDescription">
+          <p>You can select which content types you want to migrate and
+            choose to migrate references or not.</p>
         </div>
-      </metal:main>
-    </metal:bodytext>
-  </body>
+        <div id="migration-form"
+             tal:content="structure view/contents">
+             This is the real migration form
+        </div>
+      </div>
+    </tal:block>
+    <tal:block condition="linguaplone_installed">
+      <div class="important">
+        <h2 i18n:translate="">Warning</h2>
+        <p i18n:translate="" class="strong">Since you effectively have Products.LinguaPlone installed in your portal, you're not allowed to continue this migration.</p>
+        <p i18n:translate="">Have a look above for more information.</p>
+      </div>
+      </tal:block>
+  </tal:block>
+  <tal:block condition="not:object_number">
+    <div class="important">
+      <h2 i18n:translate="">Warning</h2>
+      <p i18n:translate="" class="strong">No content to migrate.</p>
+  </tal:block>
+
+</metal:block>
+</metal:content-core>
+</body>
 </html>
-</tal:page>
diff --git a/plone/app/contenttypes/migration/atct_migrator_results.pt b/plone/app/contenttypes/migration/atct_migrator_results.pt
index 56b179b..32801f0 100644
--- a/plone/app/contenttypes/migration/atct_migrator_results.pt
+++ b/plone/app/contenttypes/migration/atct_migrator_results.pt
@@ -1,162 +1,85 @@
-<!-- Stupid trick to remove useles thinks from the page ;) -->
-<tal:page
-  tal:define="ajax_load python:request.set('ajax_load', True);
-      ajax_include_head python:request.set('ajax_include_head', True)">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
       xmlns:tal="http://xml.zope.org/namespaces/tal"
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       xmlns:i18n="http://xml.zope.org/namespaces/i18n"
       lang="en"
       metal:use-macro="context/main_template/macros/master"
-      tal:define="ajax_load python:True"
       i18n:domain="plone">
-  <metal:block fill-slot="top_slot"
-      tal:define="dummy python:request.set('disable_border',1);
 
-          disable_column_two python:request.set('disable_plone.rightcolumn',1);
-          disable_column_two python:request.set('disable_plone.leftcolumn',1);
-          portal_state context/@@plone_portal_state;
-          portal_url portal_state/portal_url">
-
-    <style type="text/css">
-      div.important {
-        padding: .9em 1.2em;
-        border-radius: 10px;
-        font-size: 100%;
-      }
-      .btn-danger {
-        background-color: #DA4F49;
-        background-image: linear-gradient(to bottom, #EE5F5B, #BD362F);
-        background-repeat: repeat-x;
-        border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
-        color: #FFFFFF;
-        text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-        border-radius: 4px 4px 4px 4px;
-        border-style: solid;
-        border-width: 1px;
-        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);    cursor: pointer;
-        display: inline-block;
-        font-size: 14px;
-        line-height: 20px;
-        margin-bottom: 0;
-        padding: 4px 12px;
-        text-align: center;
-        vertical-align: middle;
-      }
-
-      .btn-danger:hover, .btn-danger:focus,
-      .btn-danger:active, .btn-danger.active {
-          color: rgb(255, 255, 255);
-          background-color: rgb(189, 54, 47);
-          text-decoration: none;
-          background-position: 0px -15px;
-          transition: background-position 0.1s linear 0s;
-      }
-
-      .btn-danger:active {
-          background-image: none;
-          outline: 0px none;
-          box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15) inset, 0px 1px 2px rgba(0, 0, 0, 0.05);
-      }
-      #migration-form , #content-core{
-          border: 1px solid #DDDDDD;
-          border-radius: 10px 10px 10px 10px;
-          font-size: 110%;
-          margin-bottom: 1em;
-          padding: 1em 1.5em;
-      }
-
-      #migration-form .formControls {
-        margin-left: 0;
-        margin-top: 4em;
-      }
-      #migration-options {
-        margin-top: 3em;
-      }
-      table td {
-        border: 1px solid #ccc;
-      }
-      table td, table th  {
-        padding: 0.2em 0.5em 0.2em;
-      }
-      table th {
-        text-align: center;
-        font-weight: normal;
-      }
-    </style>
-
-  </metal:block>
-
-  <body metal:use-macro="content">
-
-    <metal:bodytext fill-slot="main">
-      <metal:main define-macro="main"
-                  tal:define="results view/results">
-        <tal:success tal:condition="results">
-        <h1 class="documentFirstHeading"
-            i18n:translate="">Congratulations! You migrated from Archetypes to Dexterity.</h1>
-
-        <div id="content-core">
-          <p>The migration finished within <span tal:replace="results/duration">20</span> seconds</p>
-
-          <h3>Migrated Content</h3>
-          <table>
-            <tr>
-              <th>Old Type</th>
-              <th>New Type</th>
-              <th>Items</th>
-            </tr>
-            <tal:block tal:repeat="ct results/content_types">
-              <tr>
-                <td tal:content="python:results['migrated_types'][ct]['old_meta_type']"></td>
-                <td tal:content="python:results['migrated_types'][ct]['new_type_name']"></td>
-                <td tal:content="python:results['migrated_types'][ct]['amount_migrated']"></td>
-              </tr>
-            </tal:block>
-          </table>
-
-          <h3>Content before Migration</h3>
-          <table>
-            <tr>
-              <th>Type</th>
-              <th>Items</th>
-            </tr>
-            <tr tal:repeat="ct python:sorted(results['before'].keys())">
-              <td tal:content="ct"></td>
-              <td tal:content="python:results['before'][ct]"></td>
-            </tr>
-          </table>
-
-          <h3>Content after Migration</h3>
-          <table>
-            <tr>
-              <th>Type</th>
-              <th>Items</th>
-            </tr>
-            <tr tal:repeat="ct python:sorted(results['after'].keys())">
-              <td tal:content="ct"></td>
-              <td tal:content="python:results['after'][ct]"></td>
-            </tr>
-          </table>
-
-        </div>
-        </tal:success>
-
-        <div class="links">
-          <a href="atct_migrator"
-             tal:attributes="href string:${portal_url}/@@atct_migrator">
-            <span i18n:translate="">Back to the Migration-Form</span>
-          </a><br/>
-          <a href=""
-             tal:attributes="href portal_url">
-            <span i18n:translate="">Back to Plone</span>
-          </a>
-        </div>
-
-
-      </metal:main>
-    </metal:bodytext>
-  </body>
+<metal:block fill-slot="top_slot"
+    tal:define="dummy python:request.set('disable_border', 1);
+                disable_column_two python:request.set('disable_plone.rightcolumn', 1);
+                disable_column_two python:request.set('disable_plone.leftcolumn', 1);
+                portal_state context/@@plone_portal_state;
+                portal_url portal_state/portal_url">
+  <link rel="stylesheet" type="text/css" href="" media="screen" tal:attributes="href string:${portal_url}/++resource++pac_migrator.css">
+</metal:block>
+
+<body>
+
+<metal:custom_title fill-slot="content-title">
+  <h1 class="documentFirstHeading" i18n:translate="">Congratulations! You migrated from Archetypes to Dexterity.</h1>
+</metal:custom_title>
+
+<metal:content-core fill-slot="content-core">
+<metal:block define-macro="content-core"
+    tal:define="results view/results">
+
+  <tal:success tal:condition="results">
+    <p>The migration finished within <span tal:replace="results/duration">20</span> seconds</p>
+
+    <h3>Migrated Content</h3>
+    <table>
+    <tr>
+      <th>Old Type</th>
+      <th>New Type</th>
+      <th>Items</th>
+    </tr>
+    <tal:block tal:repeat="ct results/content_types">
+    <tr>
+      <td tal:content="python:results['migrated_types'][ct]['old_meta_type']"></td>
+      <td tal:content="python:results['migrated_types'][ct]['new_type_name']"></td>
+      <td tal:content="python:results['migrated_types'][ct]['amount_migrated']"></td>
+    </tr>
+    </tal:block>
+    </table>
+
+    <h3>Content before Migration</h3>
+    <table>
+    <tr>
+      <th>Type</th>
+      <th>Items</th>
+    </tr>
+    <tr tal:repeat="ct python:sorted(results['before'].keys())">
+      <td tal:content="ct"></td>
+      <td tal:content="python:results['before'][ct]"></td>
+    </tr>
+    </table>
+
+    <h3>Content after Migration</h3>
+    <table>
+    <tr>
+      <th>Type</th>
+      <th>Items</th>
+    </tr>
+    <tr tal:repeat="ct python:sorted(results['after'].keys())">
+      <td tal:content="ct"></td>
+      <td tal:content="python:results['after'][ct]"></td>
+    </tr>
+    </table>
+  </tal:success>
+
+  <div class="links">
+    <a href="atct_migrator" tal:attributes="href string:${portal_url}/@@atct_migrator">
+      <span i18n:translate="">Back to the Migration-Form</span>
+    </a>
+    <br/>
+    <a href="" tal:attributes="href portal_url">
+      <span i18n:translate="">Back to Plone</span>
+    </a>
+  </div>
+
+</metal:block>
+</metal:content-core>
+</body>
 </html>
-
-</tal:page>
diff --git a/plone/app/contenttypes/migration/configure.zcml b/plone/app/contenttypes/migration/configure.zcml
index 22b9384..f4ca85e 100644
--- a/plone/app/contenttypes/migration/configure.zcml
+++ b/plone/app/contenttypes/migration/configure.zcml
@@ -6,6 +6,11 @@
     xmlns:plone="http://namespaces.plone.org/plone"
     i18n_domain="plone.app.contenttypes">
 
+  <browser:resource
+      name="pac_migrator.css"
+      file="migrator.css"
+      layer="plone.app.contenttypes.interfaces.IPloneAppContenttypesLayer"/>
+
   <browser:page
     name="fix_base_classes"
     for="Products.CMFPlone.interfaces.IPloneSiteRoot"
diff --git a/plone/app/contenttypes/migration/migrator.css b/plone/app/contenttypes/migration/migrator.css
new file mode 100644
index 0000000..ed6e42d
--- /dev/null
+++ b/plone/app/contenttypes/migration/migrator.css
@@ -0,0 +1,70 @@
+div.important {
+  padding: .9em 1.2em;
+  border-radius: 10px;
+  font-size: 100%;
+}
+.btn-danger {
+  background-color: #DA4F49;
+  background-image: linear-gradient(to bottom, #EE5F5B, #BD362F);
+  background-repeat: repeat-x;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  color: #FFFFFF;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  border-radius: 4px 4px 4px 4px;
+  border-style: solid;
+  border-width: 1px;
+  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);    cursor: pointer;
+  display: inline-block;
+  font-size: 14px;
+  line-height: 20px;
+  margin-bottom: 0;
+  padding: 4px 12px;
+  text-align: center;
+  vertical-align: middle;
+}
+
+.btn-danger:hover, .btn-danger:focus,
+.btn-danger:active, .btn-danger.active {
+    color: rgb(255, 255, 255);
+    background-color: rgb(189, 54, 47);
+    text-decoration: none;
+    background-position: 0px -15px;
+    transition: background-position 0.1s linear 0s;
+}
+
+.btn-danger:active {
+    background-image: none;
+    outline: 0px none;
+    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15) inset, 0px 1px 2px rgba(0, 0, 0, 0.05);
+}
+#migration-form {
+    border: 1px solid #DDDDDD;
+    border-radius: 10px 10px 10px 10px;
+    font-size: 110%;
+    margin-bottom: 1em;
+    padding: 1em 1.5em;
+}
+
+#migration-form .formControls {
+  margin-left: 0;
+  margin-top: 4em;
+}
+#migration-options {
+  margin-top: 3em;
+}
+
+.strong {
+  font-size: 150%;
+  font-weight: bold;
+}
+
+table td {
+    border: 1px solid #ccc;
+}
+table td, table th  {
+    padding: 0.2em 0.5em 0.2em;
+}
+table th {
+    text-align: center;
+    font-weight: normal;
+}
diff --git a/plone/app/contenttypes/migration/utils.py b/plone/app/contenttypes/migration/utils.py
index 9e11853..57b281b 100644
--- a/plone/app/contenttypes/migration/utils.py
+++ b/plone/app/contenttypes/migration/utils.py
@@ -146,6 +146,6 @@ def _checkForExtenderInterfaces(interface):
         [a for a in sm.registeredAdapters() if interface in a.required]
     for adapter in registrations:
         if adapter.provided in extender_interfaces:
-            fields = adapter.factory(None).fields
+            fields = getattr(adapter.factory(None), 'fields', [])
             return [field.getName() for field in fields]
     return []


Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-03-07T01:13:33-08:00
Author: Johannes Raggam (thet) <raggam-nl at adm.at>
Commit: https://github.com/plone/plone.app.contenttypes/commit/808c193453877c60d36d2502e9379ccf0014d24f

add more logging messages when migrating for more verbosity whats happening

Files changed:
M plone/app/contenttypes/migration/browser.py
M plone/app/contenttypes/migration/migration.py
M plone/app/contenttypes/profiles/default/types.xml
M setup.py

diff --git a/plone/app/contenttypes/migration/browser.py b/plone/app/contenttypes/migration/browser.py
index 7fd0188..1beb9eb 100644
--- a/plone/app/contenttypes/migration/browser.py
+++ b/plone/app/contenttypes/migration/browser.py
@@ -21,6 +21,9 @@
 from zope.component import queryUtility
 from zope.interface import Interface
 
+import logging
+logger = logging.getLogger(__name__)
+
 # Schema Extender allowed interfaces
 
 from plone.app.contenttypes.content import (
@@ -77,8 +80,7 @@ def __call__(self):
 
 
 class MigrateFromATContentTypes(BrowserView):
-
-    """ Migrate the default-types (except event and topic).
+    """Migrate the default-types (except event and topic).
     This view can be called directly and it will migrate all content
     provided they were not schema-extended.
     This is also called by the migration-form below with some variables.
@@ -130,6 +132,11 @@ def __call__(self,
                 object_provides=v['iface'].__identifier__,
                 meta_type=v['old_meta_type'])
             )
+            # TODO: num objects is 0 for BlobFile and BlobImage
+            logger.info(
+                "Migrating %s objects of type %s" %
+                (amount_to_be_migrated, k)
+            )
             # call the migrator
             v['migrator'](portal)
 
@@ -327,7 +334,8 @@ def estimated_migration_time(self):
         }
 
     def linguaplone_installed(self):
-        """ Is Products.LinguaPlone installed ? """
+        """Is Products.LinguaPlone installed?
+        """
         pq = getToolByName(self.context, 'portal_quickinstaller')
         return pq.isProductInstalled('LinguaPlone')
 
diff --git a/plone/app/contenttypes/migration/migration.py b/plone/app/contenttypes/migration/migration.py
index 1f871ee..30a401c 100644
--- a/plone/app/contenttypes/migration/migration.py
+++ b/plone/app/contenttypes/migration/migration.py
@@ -31,6 +31,9 @@
 from zope.intid.interfaces import IIntIds
 from zope.lifecycleevent import ObjectModifiedEvent
 
+import logging
+logger = logging.getLogger(__name__)
+
 
 def migrate(portal, migrator):
     """return a CatalogWalker instance in order
@@ -190,6 +193,13 @@ def migrate_relatedItems(self):
 
 class ATCTBaseMigrator(CMFItemMigrator, ReferenceMigrator):
 
+    def __init__(self, *args, **kwargs):
+        super(ATCTBaseMigrator, self).__init__(*args, **kwargs)
+        logger.info(
+            "Migrating object %s" %
+            '/'.join(self.old.getPhysicalPath())
+        )
+
     def migrate_atctmetadata(self):
         field = self.old.getField('excludeFromNav')
         self.new.exclude_from_nav = field.get(self.old)
@@ -251,21 +261,13 @@ def migrate_files(portal):
     return migrate(portal, FileMigrator)
 
 
-class BlobFileMigrator(ATCTContentMigrator):
+class BlobFileMigrator(FileMigrator):
 
     src_portal_type = 'File'
     src_meta_type = 'ATBlob'
     dst_portal_type = 'File'
     dst_meta_type = None  # not used
 
-    def migrate_schema_fields(self):
-        old_file = self.old.getField('file').get(self.old)
-        filename = safe_unicode(old_file.filename)
-        namedblobfile = NamedBlobFile(contentType=old_file.content_type,
-                                      data=old_file.data,
-                                      filename=filename)
-        self.new.file = namedblobfile
-
 
 def migrate_blobfiles(portal):
     return migrate(portal, BlobFileMigrator)
@@ -292,23 +294,13 @@ def migrate_images(portal):
     return migrate(portal, ImageMigrator)
 
 
-class BlobImageMigrator(ATCTContentMigrator):
+class BlobImageMigrator(ImageMigrator):
 
     src_portal_type = 'Image'
     src_meta_type = 'ATBlob'
     dst_portal_type = 'Image'
     dst_meta_type = None  # not used
 
-    def migrate_schema_fields(self):
-
-        old_image = self.old.getField('image').get(self.old)
-        if old_image == '':
-            return
-        filename = safe_unicode(old_image.filename)
-        namedblobimage = NamedBlobImage(data=old_image.data,
-                                        filename=filename)
-        self.new.image = namedblobimage
-
 
 def migrate_blobimages(portal):
     return migrate(portal, BlobImageMigrator)
@@ -360,7 +352,7 @@ def migrate_newsitems(portal):
     return migrate(portal, NewsItemMigrator)
 
 
-class BlobNewsItemMigrator(DocumentMigrator):
+class BlobNewsItemMigrator(NewsItemMigrator):
     """ Migrator for NewsItems with blobs based on the implementation in
         https://github.com/plone/plone.app.blob/pull/2
     """
@@ -370,24 +362,6 @@ class BlobNewsItemMigrator(DocumentMigrator):
     dst_portal_type = 'News Item'
     dst_meta_type = None  # not used
 
-    def migrate_schema_fields(self):
-        # migrate the text
-        super(BlobNewsItemMigrator, self).migrate_schema_fields()
-
-        # migrate the rest of the Schema
-        old_image = self.old.getField('image').get(self.old)
-        if old_image == '':
-            return
-        filename = safe_unicode(old_image.filename)
-        old_image_data = old_image.data
-        if safe_hasattr(old_image_data, 'data'):
-            old_image_data = old_image_data.data
-        namedblobimage = NamedBlobImage(data=old_image_data,
-                                        filename=filename)
-        self.new.image = namedblobimage
-        self.new.image_caption = safe_unicode(
-            self.old.getField('imageCaption').get(self.old))
-
 
 def migrate_blobnewsitems(portal):
     return migrate(portal, BlobNewsItemMigrator)
diff --git a/plone/app/contenttypes/profiles/default/types.xml b/plone/app/contenttypes/profiles/default/types.xml
index d339dea..603d76d 100644
--- a/plone/app/contenttypes/profiles/default/types.xml
+++ b/plone/app/contenttypes/profiles/default/types.xml
@@ -24,4 +24,4 @@
  <object meta_type="Dexterity FTI" name="News Item" />
  <object meta_type="Dexterity FTI" name="Event" />
 
-</object>
\ No newline at end of file
+</object>
diff --git a/setup.py b/setup.py
index 97a2311..3011a15 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@
               'plone.app.robotframework',
               'plone.app.testing[robot]>=4.2.4',  # we need ROBOT_TEST_LEVEL
               'Products.ATContentTypes',
-              'Products.contentmigration',
+              'Products.contentmigration>=2.1.8',
           ],
           'atrefs': [
               'plone.app.referenceablebehavior',


Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-03-07T01:14:02-08:00
Author: Johannes Raggam (thet) <raggam-nl at adm.at>
Commit: https://github.com/plone/plone.app.contenttypes/commit/fb805a0a42769bcb73e9243228a9d6a10fc9f557

changelog

Files changed:
M CHANGES.rst

diff --git a/CHANGES.rst b/CHANGES.rst
index 333f147..0706162 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,7 +4,12 @@ Changelog
 1.2a2 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Add logging messages to content migrator for more verbosity on what's
+  happening while running the migration.
+  [thet]
+
+- Fix @@atct_migrator and @@atct_migrator_results templates work within Plone3.
+  [thet]
 
 
 1.2a1 (2014-02-22)




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 32302 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140307/4e624a1f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 163856 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140307/4e624a1f/attachment-0003.obj>


More information about the Testbot mailing list