Author: jleroux
Date: Sun Jun 7 08:09:47 2015 New Revision: 1683999 URL: http://svn.apache.org/r1683999 Log: "Applied fix from trunk for revision: 1683998 " ------------------------------------------------------------------------ r1683998 | jleroux | 2015-06-07 10:05:25 +0200 (dim. 07 juin 2015) | 10 lignes A patch from Martin Becker "Postal Address PDF Formatter Screen Problems" https://issues.apache.org/jira/browse/OFBIZ-6444 A couple updates are needed to the postalAddressPdfFormatter screen: First, the screen template is set to use the HTML renderer which results in this error in the log: [java] 2015-06-03 13:44:53,400 |0.0.0.0-8009-exec-13 |ModelScreenWidget |W| In platform-dependent could not find template for xsl-fo, using the one for html. Second, the various PostalAddressXXXX.fo.ftl files do not escape XML properly, and addresses with an & in them end up causing a FreeMarker template error. Test: For number 1, just get a "Report" for a quote, and then look at your log file. For number 2, add an "General Correspondence" address to a party that contains an ampersand, like "5th & Oak Street", create a quote for that Party, and then get the "Report" for that quote. ------------------------------------------------------------------------ Modified: ofbiz/branches/release14.12/ (props changed) ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl ofbiz/branches/release14.12/applications/party/widget/partymgr/PartyScreens.xml Propchange: ofbiz/branches/release14.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jun 7 08:09:47 2015 @@ -8,4 +8,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207, 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846,1672853,1672856,1672862,1672873,1673764,1674447,1674464,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1679709,1679720,1679728,1679732,1679957,1680155,1680288,1680304,1680671,1680675,1680733,1680840,1680881,1682272,1682295,1682415,1682633 +/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207, 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846,1672853,1672856,1672862,1672873,1673764,1674447,1674464,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1679709,1679720,1679728,1679732,1679957,1680155,1680288,1680304,1680671,1680675,1680733,1680840,1680881,1682272,1682295,1682415,1682633,1683998 Modified: ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl?rev=1683999&r1=1683998&r2=1683999&view=diff ============================================================================== --- ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl (original) +++ ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress.fo.ftl Sun Jun 7 08:09:47 2015 @@ -16,12 +16,14 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> - <fo:block>${postalAddress.address1!}</fo:block> - <#if postalAddress.address2?has_content><fo:block>${postalAddress.address2!}</fo:block></#if> - <fo:block>${postalAddress.city!}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId}</#if> ${postalAddress.postalCode!}</fo:block> +<#escape x as x?xml> + <fo:block>${postalAddress.address1?if_exists}</fo:block> + <#if postalAddress.address2?has_content><fo:block>${postalAddress.address2?if_exists}</fo:block></#if> + <fo:block>${postalAddress.city?if_exists}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId}</#if> ${postalAddress.postalCode?if_exists}</fo:block> <#if postalAddress.countryGeoId?has_content> <fo:block> <#assign country = postalAddress.getRelatedOne("CountryGeo", true)> ${country.get("geoName", locale)?default(country.geoId)} </fo:block> </#if> +</#escape> Modified: ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl?rev=1683999&r1=1683998&r2=1683999&view=diff ============================================================================== --- ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl (original) +++ ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_DEU.fo.ftl Sun Jun 7 08:09:47 2015 @@ -16,12 +16,14 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> - <fo:block>${postalAddress.address1!}</fo:block> - <#if postalAddress.address2?has_content><fo:block>${postalAddress.address2!}</fo:block></#if> - <fo:block>${postalAddress.postalCode!} ${postalAddress.city!}</fo:block> +<#escape x as x?xml> + <fo:block>${postalAddress.address1?if_exists}</fo:block> + <#if postalAddress.address2?has_content><fo:block>${postalAddress.address2?if_exists}</fo:block></#if> + <fo:block>${postalAddress.postalCode?if_exists} ${postalAddress.city?if_exists}</fo:block> <#if postalAddress.countryGeoId?has_content> <fo:block> <#assign country = postalAddress.getRelatedOne("CountryGeo", true)> ${country.get("geoName", locale)?default(country.geoId)} </fo:block> </#if> +</#escape> \ No newline at end of file Modified: ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl?rev=1683999&r1=1683998&r2=1683999&view=diff ============================================================================== --- ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl (original) +++ ofbiz/branches/release14.12/applications/party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl Sun Jun 7 08:09:47 2015 @@ -16,6 +16,7 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> +<#escape x as x?xml> <fo:block>${postalAddress.address1!}</fo:block> <#if postalAddress.address2?has_content><fo:block>${postalAddress.address2!}</fo:block></#if> <fo:block>${postalAddress.city!}<#if postalAddress.stateProvinceGeoId?has_content>, ${postalAddress.stateProvinceGeoId}</#if> ${postalAddress.postalCode!}</fo:block> @@ -25,3 +26,5 @@ under the License. ${country.get("geoName", locale)?default(country.geoId)} </fo:block> </#if> +</#escape> + Modified: ofbiz/branches/release14.12/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/party/widget/partymgr/PartyScreens.xml?rev=1683999&r1=1683998&r2=1683999&view=diff ============================================================================== --- ofbiz/branches/release14.12/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/branches/release14.12/applications/party/widget/partymgr/PartyScreens.xml Sun Jun 7 08:09:47 2015 @@ -1298,9 +1298,9 @@ under the License. </actions> <widgets> <platform-specific> - <html> + <xsl-fo> <html-template location="component://party/webapp/partymgr/party/contactmechtemplates/${postalAddressTemplate}"/> - </html> + </xsl-fo> </platform-specific> </widgets> </section> |
Free forum by Nabble | Edit this page |