-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2015-07-14T16:32:51+02:00 Author: Sune Broendum Woeller (sunew) <sune@woeller.dk> Commit: plone/plone.app.theming@51c0f1a fix AttributeError: 'NoneType' object has no attribute 'getroottree' when the result is not html / is empty. Files changed: M src/plone/app/theming/transform.py Repository: plone.app.theming Branch: refs/heads/master Date: 2015-07-14T16:32:51+02:00 Author: Sune Broendum Woeller (sunew) <sune@woeller.dk> Commit: plone/plone.app.theming@2b03a64 changelog Files changed: M CHANGES.rst Repository: plone.app.theming Branch: refs/heads/master Date: 2015-07-14T19:07:55+02:00 Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> Commit: plone/plone.app.theming@2c2dd00 Merge pull request #49 from sunew/fix-transform Fix transform Files changed: M CHANGES.rst M src/plone/app/theming/transform.py
- Loading branch information
Showing
1 changed file
with
81 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,220 +1,104 @@ | ||
Repository: Products.CMFPlone | ||
Repository: plone.app.theming | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2015-07-14T14:10:27+02:00 | ||
Author: polyester (polyester) <paul@cleanclothes.org> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/79d84cf13fd58f9eda120e8a3c912be56e0a71ff | ||
Date: 2015-07-14T16:32:51+02:00 | ||
Author: Sune Broendum Woeller (sunew) <sune@woeller.dk> | ||
Commit: https://github.com/plone/plone.app.theming/commit/51c0f1a3df57602cf7c3658e0428e33e7fedfb73 | ||
|
||
Update accessibility-info.pt | ||
fix AttributeError: 'NoneType' object has no attribute 'getroottree' when the result is not html / is empty. | ||
|
||
Files changed: | ||
M Products/CMFPlone/browser/templates/accessibility-info.pt | ||
|
||
diff --git a/Products/CMFPlone/browser/templates/accessibility-info.pt b/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
index 6c08c6c..ac2ca81 100644 | ||
--- a/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
+++ b/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
@@ -18,36 +18,19 @@ | ||
i18n:translate="heading_accessibility_info">Accessibility</h1> | ||
|
||
<div id="content-core"> | ||
- <p i18n:translate="text_size">Text size:</p> <noscript i18n:translate="">(Requires JavaScript)</noscript> | ||
- | ||
- <ul> | ||
- <li><a href="javascript:setBaseFontSize('largeText', 1);" | ||
- title="Large Text" | ||
- i18n:attributes="title title_large_text;" | ||
- i18n:translate="large_text">Large</a></li> | ||
- <li><a href="javascript:setBaseFontSize('',1);" | ||
- title="Normal Text" | ||
- i18n:attributes="title title_normal_text;" | ||
- i18n:translate="normal_text">Normal</a></li> | ||
- <li><a href="javascript:setBaseFontSize('smallText',1);" | ||
- title="Small Text" | ||
- i18n:attributes="title title_small_text;" | ||
- i18n:translate="small_text">Small</a></li> | ||
- </ul> | ||
+ | ||
M src/plone/app/theming/transform.py | ||
|
||
diff --git a/src/plone/app/theming/transform.py b/src/plone/app/theming/transform.py | ||
index 9e214df..05ff8fa 100644 | ||
--- a/src/plone/app/theming/transform.py | ||
+++ b/src/plone/app/theming/transform.py | ||
@@ -91,7 +91,7 @@ def parseTree(self, result): | ||
|
||
<p i18n:translate="description_accessibility_info"> | ||
- This site uses the <a href="http://plone.org" i18n:name="plone">Open Source Content Management System Plone</a> | ||
- and has been designed to be completely accessible and usable, working in | ||
+ This site uses the open source Content Management System<a href="http://plone.com" i18n:name="plone">Plone</a>, | ||
+ and is designed to be completely accessible and usable, working in | ||
accordance with the Web Content Accessibility Guidelines | ||
(<acronym i18n:name="wcag" | ||
title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym> v2.0). | ||
- If there is anything on this site — accessibility or validation related — | ||
- that is not according to the standard, please contact the <span i18n:name="site_admin"> | ||
- <a href="#" | ||
- i18n:translate="label_site_admin" | ||
- tal:attributes="href string:${context/portal_url}/contact-info">Site Administration</a></span>, | ||
- and not the Plone Team. | ||
+ i18n:attributes="title title_wcag;">WCAG</acronym> v2.0)<br></br> | ||
+ For people contributing content to this site, the accessibility standard we adhere to is <acronym i18n:name="atag" | ||
+ title="Authoring Tool Accessibility Guidelines" | ||
+ i18n:attributes="title title_wcag;">ATAG</acronym> 2.0. | ||
+ | ||
</p> | ||
try: | ||
return getHTMLSerializer(result, pretty_print=False) | ||
- except (TypeError, etree.ParseError): | ||
+ except (AttributeError, TypeError, etree.ParseError): | ||
return None | ||
|
||
<h2 i18n:translate="heading_accessibility_statement">Accessibility Statement</h2> | ||
@@ -61,18 +44,9 @@ | ||
<h3 i18n:translate="heading_validation">Validation</h3> | ||
def transformString(self, result, encoding): | ||
|
||
|
||
Repository: plone.app.theming | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2015-07-14T16:32:51+02:00 | ||
Author: Sune Broendum Woeller (sunew) <sune@woeller.dk> | ||
Commit: https://github.com/plone/plone.app.theming/commit/2b03a64df35763eaaeac90f03d307126bb603286 | ||
|
||
changelog | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 6e769b4..76a3d3e 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -49,6 +49,10 @@ Changelog | ||
1.2.3 (2015-05-04) | ||
------------------ | ||
|
||
<p i18n:translate="description_validation"> | ||
- We have used | ||
- <acronym i18n:name="xhtml" | ||
- title="eXtensible Hyper Text Markup Language" | ||
- i18n:attributes="title title_xhtml;">XHTML</acronym> 1.0 | ||
- and <acronym i18n:name="css" | ||
- title="Cascading Style Sheets" | ||
- i18n:attributes="title title_css;">CSS</acronym> that conforms to | ||
- specification, as laid out by the | ||
- <acronym i18n:name="w3c" | ||
- title="World Wide Web Consortium" | ||
- i18n:attributes="title title_w3c;">W3C</acronym> because we believe | ||
- that usability and accessibility must have a solid foundation. | ||
+ The site uses assistive technology like WAI-ARIA roles to the current best practices. | ||
+ However, both standards and the actual content of sites vary over time. | ||
+- fix AttributeError: 'NoneType' object has no attribute 'getroottree' when the result is not | ||
+ html / is empty. | ||
+ [sunew] | ||
+ | ||
If anything on this web site does not validate correctly, please contact the | ||
<span i18n:name="site_admin"><a href="/contact-info" | ||
tal:attributes="href string:${context/portal_url}/contact-info" | ||
@@ -81,16 +55,14 @@ | ||
</p> | ||
|
||
<p i18n:translate="description_wcag_aa_rating"> | ||
- We have also endeavoured to achieve AA accessibility as measured against | ||
- version 2.0 of the | ||
+ We aim for the 'AA' level of version 2.0 of both | ||
<acronym i18n:name="wcag" | ||
title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym>. | ||
- We are aware however, that a number of the checkpoints of the | ||
- <acronym i18n:name="wcag2" | ||
- title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym> are | ||
- subjective — and although we are sure that we have met them squarely, | ||
+ i18n:attributes="title title_wcag;">WCAG</acronym> and <acronym i18n:name="atag" | ||
+ title="Authoring Tool Accessibility Guidelines" | ||
+ i18n:attributes="title title_wcag;">ATAG</acronym> | ||
+ We are aware however, that a number of checkpoints in these guidelines are | ||
+ subjective — and although we are sure that we have met them satisfactory, | ||
there may be instances where interpretation may vary. | ||
</p> | ||
</div> | ||
|
||
|
||
Repository: Products.CMFPlone | ||
- make control panel usable again. Fixed problem where skins | ||
control panel is no longer present. | ||
[vangheem] | ||
|
||
|
||
Repository: plone.app.theming | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2015-07-14T17:24:58+02:00 | ||
Author: Philip Bauer (pbauer) <bauer@starzel.de> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/b9936a9b027e48501a22e6cdf4af88dda78cda84 | ||
Date: 2015-07-14T19:07:55+02:00 | ||
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> | ||
Commit: https://github.com/plone/plone.app.theming/commit/2c2dd001f3a21eb7df0aabe7c25c199453e38721 | ||
|
||
Merge pull request #678 from plone/polyester-patch-1 | ||
Merge pull request #49 from sunew/fix-transform | ||
|
||
Update accessibility-info.pt | ||
Fix transform | ||
|
||
Files changed: | ||
M Products/CMFPlone/browser/templates/accessibility-info.pt | ||
|
||
diff --git a/Products/CMFPlone/browser/templates/accessibility-info.pt b/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
index 6c08c6c..ac2ca81 100644 | ||
--- a/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
+++ b/Products/CMFPlone/browser/templates/accessibility-info.pt | ||
@@ -18,36 +18,19 @@ | ||
i18n:translate="heading_accessibility_info">Accessibility</h1> | ||
|
||
<div id="content-core"> | ||
- <p i18n:translate="text_size">Text size:</p> <noscript i18n:translate="">(Requires JavaScript)</noscript> | ||
- | ||
- <ul> | ||
- <li><a href="javascript:setBaseFontSize('largeText', 1);" | ||
- title="Large Text" | ||
- i18n:attributes="title title_large_text;" | ||
- i18n:translate="large_text">Large</a></li> | ||
- <li><a href="javascript:setBaseFontSize('',1);" | ||
- title="Normal Text" | ||
- i18n:attributes="title title_normal_text;" | ||
- i18n:translate="normal_text">Normal</a></li> | ||
- <li><a href="javascript:setBaseFontSize('smallText',1);" | ||
- title="Small Text" | ||
- i18n:attributes="title title_small_text;" | ||
- i18n:translate="small_text">Small</a></li> | ||
- </ul> | ||
+ | ||
M CHANGES.rst | ||
M src/plone/app/theming/transform.py | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 6e769b4..76a3d3e 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -49,6 +49,10 @@ Changelog | ||
1.2.3 (2015-05-04) | ||
------------------ | ||
|
||
<p i18n:translate="description_accessibility_info"> | ||
- This site uses the <a href="http://plone.org" i18n:name="plone">Open Source Content Management System Plone</a> | ||
- and has been designed to be completely accessible and usable, working in | ||
+ This site uses the open source Content Management System<a href="http://plone.com" i18n:name="plone">Plone</a>, | ||
+ and is designed to be completely accessible and usable, working in | ||
accordance with the Web Content Accessibility Guidelines | ||
(<acronym i18n:name="wcag" | ||
title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym> v2.0). | ||
- If there is anything on this site — accessibility or validation related — | ||
- that is not according to the standard, please contact the <span i18n:name="site_admin"> | ||
- <a href="#" | ||
- i18n:translate="label_site_admin" | ||
- tal:attributes="href string:${context/portal_url}/contact-info">Site Administration</a></span>, | ||
- and not the Plone Team. | ||
+ i18n:attributes="title title_wcag;">WCAG</acronym> v2.0)<br></br> | ||
+ For people contributing content to this site, the accessibility standard we adhere to is <acronym i18n:name="atag" | ||
+ title="Authoring Tool Accessibility Guidelines" | ||
+ i18n:attributes="title title_wcag;">ATAG</acronym> 2.0. | ||
+- fix AttributeError: 'NoneType' object has no attribute 'getroottree' when the result is not | ||
+ html / is empty. | ||
+ [sunew] | ||
+ | ||
</p> | ||
- make control panel usable again. Fixed problem where skins | ||
control panel is no longer present. | ||
[vangheem] | ||
diff --git a/src/plone/app/theming/transform.py b/src/plone/app/theming/transform.py | ||
index 9e214df..05ff8fa 100644 | ||
--- a/src/plone/app/theming/transform.py | ||
+++ b/src/plone/app/theming/transform.py | ||
@@ -91,7 +91,7 @@ def parseTree(self, result): | ||
|
||
<h2 i18n:translate="heading_accessibility_statement">Accessibility Statement</h2> | ||
@@ -61,18 +44,9 @@ | ||
<h3 i18n:translate="heading_validation">Validation</h3> | ||
|
||
<p i18n:translate="description_validation"> | ||
- We have used | ||
- <acronym i18n:name="xhtml" | ||
- title="eXtensible Hyper Text Markup Language" | ||
- i18n:attributes="title title_xhtml;">XHTML</acronym> 1.0 | ||
- and <acronym i18n:name="css" | ||
- title="Cascading Style Sheets" | ||
- i18n:attributes="title title_css;">CSS</acronym> that conforms to | ||
- specification, as laid out by the | ||
- <acronym i18n:name="w3c" | ||
- title="World Wide Web Consortium" | ||
- i18n:attributes="title title_w3c;">W3C</acronym> because we believe | ||
- that usability and accessibility must have a solid foundation. | ||
+ The site uses assistive technology like WAI-ARIA roles to the current best practices. | ||
+ However, both standards and the actual content of sites vary over time. | ||
+ | ||
If anything on this web site does not validate correctly, please contact the | ||
<span i18n:name="site_admin"><a href="/contact-info" | ||
tal:attributes="href string:${context/portal_url}/contact-info" | ||
@@ -81,16 +55,14 @@ | ||
</p> | ||
try: | ||
return getHTMLSerializer(result, pretty_print=False) | ||
- except (TypeError, etree.ParseError): | ||
+ except (AttributeError, TypeError, etree.ParseError): | ||
return None | ||
|
||
<p i18n:translate="description_wcag_aa_rating"> | ||
- We have also endeavoured to achieve AA accessibility as measured against | ||
- version 2.0 of the | ||
+ We aim for the 'AA' level of version 2.0 of both | ||
<acronym i18n:name="wcag" | ||
title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym>. | ||
- We are aware however, that a number of the checkpoints of the | ||
- <acronym i18n:name="wcag2" | ||
- title="Web Content Accessibility Guidelines" | ||
- i18n:attributes="title title_wcag;">WCAG</acronym> are | ||
- subjective — and although we are sure that we have met them squarely, | ||
+ i18n:attributes="title title_wcag;">WCAG</acronym> and <acronym i18n:name="atag" | ||
+ title="Authoring Tool Accessibility Guidelines" | ||
+ i18n:attributes="title title_wcag;">ATAG</acronym> | ||
+ We are aware however, that a number of checkpoints in these guidelines are | ||
+ subjective — and although we are sure that we have met them satisfactory, | ||
there may be instances where interpretation may vary. | ||
</p> | ||
</div> | ||
def transformString(self, result, encoding): | ||
|
||
|