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

jenkins at plone.org jenkins at plone.org
Sun Aug 17 20:10:00 UTC 2014


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

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


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

Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-08-02T14:19:59+08:00
Author: Jian Aijun (jianaijun) <jianaijun at gmail.com>
Commit: https://github.com/plone/plone.app.contenttypes/commit/13aa5050bbc4fb8e7b027e502834c5e4f944c984

Fix 'AttributeError: image' when NewsItem unused the lead image behavior.

Files changed:
M docs/CHANGES.rst
M plone/app/contenttypes/browser/templates/newsitem.pt

diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index 7ef7f95..c363eb2 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -4,6 +4,9 @@ Changelog
 1.2a4 (unreleased)
 ------------------
 
+- Fix 'AttributeError: image' when NewsItem unused the lead image behavior.
+  [jianaijun]
+
 - Restore Plone 4.3 compatibility by depending on ``plone.app.event >= 2.0a4``.
   The previous release of p.a.c got an implicit Plone 5 dependency through a
   previous version of plone.app.event.
diff --git a/plone/app/contenttypes/browser/templates/newsitem.pt b/plone/app/contenttypes/browser/templates/newsitem.pt
index 20efd6b..93d034a 100644
--- a/plone/app/contenttypes/browser/templates/newsitem.pt
+++ b/plone/app/contenttypes/browser/templates/newsitem.pt
@@ -19,7 +19,7 @@
     <metal:block define-macro="content-core"
           tal:define="templateId template/getId;
                       scale_func context/@@images;
-                      scaled_image python: context.image and scale_func.scale('image', scale='mini')">
+                      scaled_image python: hasattr(context.aq_explicit, 'image') and scale_func.scale('image', scale='mini')">
 
         <div class="newsImageContainer"
              tal:condition="python: scaled_image">
@@ -43,7 +43,7 @@
              tal:content="structure context/text/output" />
 
         <div class="newsFileContainer"
-             tal:condition="python: context.image and not scaled_image">
+             tal:condition="python: hasattr(context.aq_explicit, 'image') and not scaled_image">
             <a tal:content="structure python:context.image_caption or context.image.filename"
                tal:attributes="href python:'%s/@@download/image' % context.absolute_url()">
             </a>


Repository: plone.app.contenttypes
Branch: refs/heads/master
Date: 2014-08-17T21:12:40+02:00
Author: Jens W. Klein (jensens) <jens at bluedynamics.com>
Commit: https://github.com/plone/plone.app.contenttypes/commit/fb570f3125705e1ca474fd799dbafa9925d6ecb9

Merge pull request #168 from jianaijun/master

Fix 'AttributeError: image' when NewsItem unused the lead image behavior...

Files changed:
M docs/CHANGES.rst
M plone/app/contenttypes/browser/templates/newsitem.pt

diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index 7ef7f95..c363eb2 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -4,6 +4,9 @@ Changelog
 1.2a4 (unreleased)
 ------------------
 
+- Fix 'AttributeError: image' when NewsItem unused the lead image behavior.
+  [jianaijun]
+
 - Restore Plone 4.3 compatibility by depending on ``plone.app.event >= 2.0a4``.
   The previous release of p.a.c got an implicit Plone 5 dependency through a
   previous version of plone.app.event.
diff --git a/plone/app/contenttypes/browser/templates/newsitem.pt b/plone/app/contenttypes/browser/templates/newsitem.pt
index 20efd6b..93d034a 100644
--- a/plone/app/contenttypes/browser/templates/newsitem.pt
+++ b/plone/app/contenttypes/browser/templates/newsitem.pt
@@ -19,7 +19,7 @@
     <metal:block define-macro="content-core"
           tal:define="templateId template/getId;
                       scale_func context/@@images;
-                      scaled_image python: context.image and scale_func.scale('image', scale='mini')">
+                      scaled_image python: hasattr(context.aq_explicit, 'image') and scale_func.scale('image', scale='mini')">
 
         <div class="newsImageContainer"
              tal:condition="python: scaled_image">
@@ -43,7 +43,7 @@
              tal:content="structure context/text/output" />
 
         <div class="newsFileContainer"
-             tal:condition="python: context.image and not scaled_image">
+             tal:condition="python: hasattr(context.aq_explicit, 'image') and not scaled_image">
             <a tal:content="structure python:context.image_caption or context.image.filename"
                tal:attributes="href python:'%s/@@download/image' % context.absolute_url()">
             </a>




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 4382 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140817/10b4a253/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 172547 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140817/10b4a253/attachment-0003.obj>


More information about the Testbot mailing list