[jira] Created: (OFBIZ-2865) productdetail.ftl returns a Freemarker error for digital download products when no contentName exists

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-2865) productdetail.ftl returns a Freemarker error for digital download products when no contentName exists

Nicolas Malin (Jira)
productdetail.ftl returns a Freemarker error for digital download products when no contentName exists
-----------------------------------------------------------------------------------------------------

                 Key: OFBIZ-2865
                 URL: https://issues.apache.org/jira/browse/OFBIZ-2865
             Project: OFBiz
          Issue Type: Bug
          Components: specialpurpose/ecommerce
    Affects Versions: Release Branch 4.0, Release Branch 9.04, SVN trunk
         Environment: N/A
            Reporter: Ruth Hoffman
            Priority: Minor


productdetail.ftl returns a Freemarker error to the product detail web page as shown below for digital download products when no contentName exists.

Download Files for this Product:
Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. The problematic instruction: ---------- ==> ${downloadProductContentAndInfo.contentName} [on line 524, column 32 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-2865) productdetail.ftl returns a Freemarker error for digital download products when no contentName exists

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747960#action_12747960 ]

Ruth Hoffman commented on OFBIZ-2865:
-------------------------------------

Note: this is a bug because when you enter the content information for a digital product, contentName is not a required field.

Fix is to add ?if_exists as shown below:


<div class="tabletext">${downloadProductContentAndInfo.contentName?if_exists}<#if downloadProductContentAndInfo.description?has_content> - ${downloadProductContentAndInfo.description}</#if></div>

> productdetail.ftl returns a Freemarker error for digital download products when no contentName exists
> -----------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-2865
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2865
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: Release Branch 4.0, Release Branch 9.04, SVN trunk
>         Environment: N/A
>            Reporter: Ruth Hoffman
>            Priority: Minor
>
> productdetail.ftl returns a Freemarker error to the product detail web page as shown below for digital download products when no contentName exists.
> Download Files for this Product:
> Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. The problematic instruction: ---------- ==> ${downloadProductContentAndInfo.contentName} [on line 524, column 32 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-2865) productdetail.ftl returns a Freemarker error for digital download products when no contentName exists

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-2865.
----------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk
                   Release Branch 9.04
         Assignee: Jacques Le Roux

Thanks for report Ruth,

Should be fixed in trunk at r810809, R9.04 at r810810   (I did not care of R4.0, too old. for such a little bug..)

> productdetail.ftl returns a Freemarker error for digital download products when no contentName exists
> -----------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-2865
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2865
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: Release Branch 4.0, Release Branch 9.04, SVN trunk
>         Environment: N/A
>            Reporter: Ruth Hoffman
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 9.04, SVN trunk
>
>
> productdetail.ftl returns a Freemarker error to the product detail web page as shown below for digital download products when no contentName exists.
> Download Files for this Product:
> Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. The problematic instruction: ---------- ==> ${downloadProductContentAndInfo.contentName} [on line 524, column 32 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression downloadProductContentAndInfo.contentName is undefined on line 524, column 34 in component://order/webapp/ordermgr/entry/catalog/productdetail.ftl. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:351) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.